Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling #613

Closed
wants to merge 107 commits into from
Closed

Spelling #613

wants to merge 107 commits into from

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented Dec 10, 2021

https://issues.apache.org/jira/browse/LOG4J2-3203

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@6864e28#commitcomment-61673287

The action reports that the changes in this PR would make it happy: jsoref@db6552e

Note: this PR does not include the action. If you're interested in running a spell check on every PR and push, that can be offered separately.

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
@zuoshangs
Copy link

emm

@vy
Copy link
Member

vy commented Dec 10, 2021

@jsoref, even though we appreciate your contribution for code clean-ups, it is quite time consuming for us to review every single line, in particular, given your changes span across hundreds of files and thousands of lines. Time is a pretty scarce resource among Log4j maintainers and we rather spend that on higher priority issues, e.g., bug triages & fixes, (killer?) features, etc.

It would be a pity to get you discouraged from contributing, yet, we think such bulk code clean-ups are better done by committers without needing the attention of another developer. That said, we will be more than happy to see you participating in more functional Log4j stories. Would you consider either improving the documentation and/or picking up open Jira issues? This might also make your way to becoming a committer, where you can freely go wild with your code clean-ups.

@vy vy closed this Dec 10, 2021
@jsoref
Copy link
Contributor Author

jsoref commented Dec 10, 2021

I'm not currently a log4j2 user.

We happen to be using log4j, so, in theory, I have some potential interest in this project as opposed to just offering a general contribution to a project I've heard of – which I do regularly.

I personally tend to check the health of a project by sending a change like this. (That you responded in under a day puts you into the healthy side by one of my measures.)

I'm quite happy to respond to review comments, e.g. "only this directory", or "only comments", or "only code", or "drop these directories", or "squash".

In a past life, I did a lot of bug triage. I don't have a particular interest to do that in my spare time. I do appreciate your offer and attempts to grow your community.

Fwiw, I am an ASF contributor and an working on getting similar changes merged into other ASF projects. I'm also very patient, it doesn't matter to me if it takes a year to integrate changes – since I can do other work elsewhere in the interim.

@jvz
Copy link
Member

jvz commented Dec 10, 2021

Josh, long time no see! It'd be awesome if you could either break up changes or leave PR comments on relevant areas to help with review.

Copy link
Contributor Author

@jsoref jsoref left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally do leave an annotation of the interesting bits.

I've skipped commenting on local variable renames as they're generally uninteresting. Similarly, I've skipped most comment changes.

Happy to split.

@@ -1,7 +1,7 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional inparserion regarding copyright ownership.
* this work for additional information regarding copyright ownership.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This damaged content is original to the file and is in a license block, which I'd imagine is probably bad form per ASF.

@@ -29,7 +29,7 @@
@Tag("allocation")
@Tag("functional")
@Category(GarbageFree.class)
public class GcFreeMixedSyncAyncLoggingTest {
public class GcFreeMixedSyncAsyncLoggingTest {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh, java classes require a rename -- I have a script to do that but generally forget to use it since most of the time I'm not touching java projects...

| log4j2.kubernetes.client.loggingInberval | spring.cloud.kubernetes.client.loggingInterval | 20s | Logging interval |
| log4j2.kubernetes.client.loggingInterval | spring.cloud.kubernetes.client.loggingInterval | 20s | Logging interval |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is user facing documentation which is actually wrong.

log4j.logger.org.apache.hadoop.crytpo.key.kms.server=ALL
log4j.logger.org.apache.hadoop.crypto.key.kms.server=ALL
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"justification": "Removed deprectated method"
"justification": "Removed deprecated method"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably developer facing documentation

* https://www.ralphgoers.com/post/log4j-1-compatibility-in-log4j-2[Log4j 1 Compatiblity in Log4j 2]
* https://www.ralphgoers.com/post/log4j-1-compatibility-in-log4j-2[Log4j 1 Compatibility in Log4j 2]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link description doesn't match the actual title of the web page.

Comment on lines -120 to +122
The Log4j-1.2-api module of Log4j 2 provides compatiblity for applications using the Log4j 1 logging methods. As
The Log4j-1.2-api module of Log4j 2 provides compatibility for applications using the Log4j 1 logging methods. As
of Log4j 2.13.0 Log4j 2 also provides experimental support for Log4j 1.x configuration files. See
link:manual/compatiblity.html[Log4j 2 Compatiblity with Log4j 1] for more information.
link:manual/compatibility.html[Log4j 2 Compatibility with Log4j 1] for more information.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This developer facing link is bad, as the actual file is: src/site/markdown/manual/compatibility.md

Comment on lines -1273 to +1278
|allowdLdapClasses|String|null|A comma separated list of fully qualified class names that may be accessed by LDAP.
The classes must implement Serializable. Only applies when the JMS Appender By default only Java primative classes
|allowedLdapClasses|String|null|A comma separated list of fully qualified class names that may be accessed by LDAP.
The classes must implement Serializable. Only applies when the JMS Appender By default only Java primitive classes
are allowed.
|allowdLdapHosts|String|null|A comma separated list of host names or ip addresses that may be accessed by LDAP.
|allowedLdapHosts|String|null|A comma separated list of host names or ip addresses that may be accessed by LDAP.
By default only the local host names and ip addresses are allowed.
|allowdJndiProtocols|String|null|A comma separated list of protocol names that JNDI will allow. By default only java,
|allowedJndiProtocols|String|null|A comma separated list of protocol names that JNDI will allow. By default only java,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This developer facing documentation is wrong as these fields don't exist in these misspelled forms.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally my tooling doesn't merge commits together, but this probably happened because of a merge conflict when I sorted my commits. Sorry about that.

Comment on lines 160 to +163
public String doUpdate(String table, Map<String, String> params) {
logger.entry(param);

logger.debug(UPDATE_MARKER, new SQLMessage(SQLMessage.SQLType.UPDATE, table, parmas);
logger.debug(UPDATE_MARKER, new SQLMessage(SQLMessage.SQLType.UPDATE, table, params);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This developer facing sample is broken

<item name="Configuration Archtecture" href="/manual/configuration.html#Architecture"/>
<item name="Configuration Architecture" href="/manual/configuration.html#Architecture"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably means that the front facing ToC is bad. This makes it harder for users to find things (it's at least screen reader hostile, but also problematic for anyone using search).

@jvz
Copy link
Member

jvz commented Dec 10, 2021

I'll review this in more detail later.

@jvz jvz reopened this Dec 10, 2021
@pjfanning
Copy link
Contributor

One typo that I noticed earlier was 'primative' appearing in a few places in one of the PRs related to the recent CVE issue. (https://github.com/apache/logging-log4j2/pull/608/files) -- since a lot of people will be reading these changes in particular, this typo would be a good one to start with - I can do a PR for just this one if people think that is a good idea

@rgoers
Copy link
Member

rgoers commented Dec 12, 2021

@pjfanning That is one of my favorite words to misspell. :-)

@jsoref
Copy link
Contributor Author

jsoref commented Dec 12, 2021

I don't care about credit. I make PRs to improve codebases. Feel free to cherry-pick whichever pieces/ideas you like (or reimplement).

I've also made a corresponding set of changes for release-2.x: https://github.com/jsoref/logging-log4j2/commits/spelling-2.x
As with this PR, the list of typos addressed is available: jsoref@db662e0#commitcomment-61761571 (and jsoref@0e88f32 shows the spell-checker isn't unhappy).

I'm quite willing to make a subset of changes. The easiest thing would be to drop changes to .java files (and a couple of changes that relate to them). I think overall that the non .java files tend to be developer/user facing.

@vy vy deleted the branch apache:master February 28, 2023 15:02
@vy vy closed this Feb 28, 2023
@ppkarwasz
Copy link
Contributor

This was closed automatically by Github because we renamed the release-2.x branch to 2.x. Feel free to resubmit to the 2.x branch.

@jsoref
Copy link
Contributor Author

jsoref commented Mar 1, 2023

I'm working on it, but your linters and I do not get along.

@ppkarwasz
Copy link
Contributor

Spotless can correct formatting violation: run mvn spotless:apply.

Formatting checks bother everybody, but it beats conflicts caused by whitespace differences.

@jsoref
Copy link
Contributor Author

jsoref commented Mar 1, 2023

[ERROR] No plugin found for prefix 'spotless' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/jsoref/.m2/repository), apache.snapshots (https://repository.apache.org/snapshots), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

@ppkarwasz
Copy link
Contributor

@jsoref,

There is a module without spotless (log4j-bom). If you exclude it, everything should work.

@jsoref
Copy link
Contributor Author

jsoref commented Mar 1, 2023

That's unhelpful. Please provide a full incantation instead of a random hint.

@ppkarwasz
Copy link
Contributor

@jsoref: in bash you run mvn spotless:apply -pl \!log4j-bom. Other shells have different ways to escape !.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants