Skip to content

Commit

Permalink
Merge pull request #4232 from deining:fix/typos
Browse files Browse the repository at this point in the history
[doc] Fixing typos #4232
  • Loading branch information
adangel committed Nov 25, 2022
2 parents a5cce75 + db6a30c commit 44cc43c
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 133 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -7006,6 +7006,15 @@
"contributions": [
"doc"
]
},
{
"login": "deining",
"name": "Andreas Deininger",
"avatar_url": "https://avatars.githubusercontent.com/u/18169566?v=4",
"profile": "https://github.com/deining",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ All you need to do is follow this few steps:
}
```

- For JavaCC grammars you should subclass [JavaCCTokenizer](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/internal/JavaCCTokenizer.java) wich has many examples you could follow, you should also take the [Python implementation](https://github.com/pmd/pmd/blob/master/pmd-python/src/main/java/net/sourceforge/pmd/cpd/PythonTokenizer.java) as reference
- For JavaCC grammars you should subclass [JavaCCTokenizer](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/internal/JavaCCTokenizer.java) which has many examples you could follow, you should also take the [Python implementation](https://github.com/pmd/pmd/blob/master/pmd-python/src/main/java/net/sourceforge/pmd/cpd/PythonTokenizer.java) as reference
- For any other scenario you can use [AnyTokenizer](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java)

3. Create your [Language](https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java) class
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/pmd/projectdocs/committers/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Here is, what happens:
to <https://sourceforge.net/projects/pmd/files/pmd/>.
* Upload the documentation to <https://docs.pmd-code.org>, e.g. <https://docs.pmd-code.org/pmd-doc-6.34.0/> and
create a symlink, so that <https://docs.pmd-code.org/latest/> points to the new version.
* Remove the old snapshot documention, e.g. so that <https://docs.pmd-code.org/pmd-doc-6.34.0-SNAPSHOT/> is gone.
* Remove the old snapshot documentation, e.g. so that <https://docs.pmd-code.org/pmd-doc-6.34.0-SNAPSHOT/> is gone.
Also create a symlink from pmd-doc-6.34.0-SNAPSHOT to pmd-doc-6.34.0, so that old references still work, e.g.
<https://docs.pmd-code.org/pmd-doc-6.34.0-SNAPSHOT/> points to the released version.
* Deploy javadoc to "https://docs.pmd-code.org/apidocs/*/RELEASE_VERSION/", e.g.
Expand Down
211 changes: 106 additions & 105 deletions docs/pages/pmd/projectdocs/credits.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/pages/pmd/projectdocs/trivia/similarprojects.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ author: Tom Copeland <tom@infoether.org>, David Dixon-Peugh <ddp@apache.org>

## High level reporting

* <a href="http://xradar.sourceforge.net">XRadar</a> - Agregates data from a lot of code quality tool to generate
* <a href="http://xradar.sourceforge.net">XRadar</a> - Aggregates data from a lot of code quality tool to generate
a full quality dashboard.
* <a href="http://www.sonarsource.com/">Sonar</a> - Pretty much like XRadar, but younger project, fully integrated
to maven 2 (but requires a database)
* <a href="http://mojo.codehaus.org/dashboard-maven-plugin/">Maven Dashboard</a> - Same kind of agregator but
* <a href="http://mojo.codehaus.org/dashboard-maven-plugin/">Maven Dashboard</a> - Same kind of aggregator but
only for maven project.
* <a href="http://qalab.sourceforge.net/">QALab</a> - Yet another maven plugin...
4 changes: 2 additions & 2 deletions docs/pages/pmd/userdocs/extending/metrics_howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ the Java framework but it's symmetrical in the Apex framework.
* **Metrics should be stateless**. In any case, instances of the same metric class
are considered `equals`. The same instance of your metric will be used to
compute the metric on the AST of different nodes so it should really be
"functionnally pure". That rule also makes you keep it simple and understandable
"functionally pure". That rule also makes you keep it simple and understandable
which is nice.
* **Implementation patterns:** You can implement your `computeFor` method as you
like it. But most metrics in our library are implemented following a few
Expand All @@ -251,7 +251,7 @@ the Java framework but it's symmetrical in the Apex framework.
* *Signature matching metrics:* That's even more straightforward when you want
to count the number of methods or fields that match a specific signature, e.g.
public static final fields. Basically a signature is an object that describes
a field or method, with info about its modifers and other node-specific info.
a field or method, with info about its modifiers and other node-specific info.
`AbstractJavaClassMetric` has a few methods that allow you to count signatures
directly, see e.g. the metrics [NOPA](https://github.com/pmd/pmd/blob/master/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/metrics/impl/NopaMetric.java)
and [WOC](https://github.com/pmd/pmd/blob/master/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/metrics/impl/WocMetric.java).
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/pmd/userdocs/making_rulesets.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ a single rule reference." %}

### Filtering the processed files

You can exclude some files from being processed by a ruleset using **exclude patterns**, with an optional overridding **include pattern**. A file will be excluded from processing *when there is a matching exclude pattern, but no matching include pattern*. This exclude/include technique works regardless of how PMD is used (e.g. command line, IDE, Ant), making it easier to keep application of your PMD rules consistent throughout your environment. Here is an example:
You can exclude some files from being processed by a ruleset using **exclude patterns**, with an optional overriding **include pattern**. A file will be excluded from processing *when there is a matching exclude pattern, but no matching include pattern*. This exclude/include technique works regardless of how PMD is used (e.g. command line, IDE, Ant), making it easier to keep application of your PMD rules consistent throughout your environment. Here is an example:

```xml
<?xml version="1.0"?>
Expand Down
27 changes: 14 additions & 13 deletions docs/pages/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,23 @@ PMD 7 will remove support for `--files` in favor of these new flags.

* The old designer (`run.sh designerold`) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: `run.sh designer`.

* The old visual AST viewer (`run.sh bgastviewer`) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: `run.sh designer` for a visual tool, or use `run.sh ast-dump` for a text-based aleternative.
* The old visual AST viewer (`run.sh bgastviewer`) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: `run.sh designer` for a visual tool, or use `run.sh ast-dump` for a text-based alternative.

#### Deprecated API

* The following core APIs have been marked as deprecated for removal in PMD 7:
- {% jdoc core::PMD %} and {% jdoc core::PMD.StatusCode %} - PMD 7 will ship with a revamped CLI split from pmd-core. To programatically launch analysis you can use {% jdoc core::PmdAnalysis %}.
- {% jdoc !!core::PMDConfiguration#getAllInputPaths() %} - It is now superceded by {% jdoc !!core::PMDConfiguration#getInputPathList() %}
- {% jdoc !!core::PMDConfiguration#setInputPaths(List) %} - It is now superceded by {% jdoc !!core::PMDConfiguration#setInputPathList(List) %}
- {% jdoc !!core::PMDConfiguration#addInputPath(String) %} - It is now superceded by {% jdoc !!core::PMDConfiguration#addInputPath(Path) %}
- {% jdoc !!core::PMDConfiguration#getInputFilePath() %} - It is now superceded by {% jdoc !!core::PMDConfiguration#getInputFile() %}
- {% jdoc !!core::PMDConfiguration#getIgnoreFilePath() %} - It is now superceded by {% jdoc !!core::PMDConfiguration#getIgnoreFile() %}
- {% jdoc !!core::PMDConfiguration#setInputFilePath(String) %} - It is now superceded by {% jdoc !!core::PMDConfiguration#setInputFilePath(Path) %}
- {% jdoc !!core::PMDConfiguration#setIgnoreFilePath(String) %} - It is now superceded by {% jdoc !!core::PMDConfiguration#setIgnoreFilePath(Path) %}
- {% jdoc !!core::PMDConfiguration#getInputUri() %} - It is now superceded by {% jdoc !!core::PMDConfiguration#getUri() %}
- {% jdoc !!core::PMDConfiguration#setInputUri(String) %} - It is now superceded by {% jdoc !!core::PMDConfiguration#setInputUri(URI) %}
- {% jdoc !!core::PMDConfiguration#getReportFile() %} - It is now superceded by {% jdoc !!core::PMDConfiguration#getReportFilePath() %}
- {% jdoc !!core::PMDConfiguration#setReportFile(String) %} - It is now superceded by {% jdoc !!core::PMDConfiguration#setReportFile(Path) %}
- {% jdoc core::PMD %} and {% jdoc core::PMD.StatusCode %} - PMD 7 will ship with a revamped CLI split from pmd-core. To programmatically launch analysis you can use {% jdoc core::PmdAnalysis %}.
- {% jdoc !!core::PMDConfiguration#getAllInputPaths() %} - It is now superseded by {% jdoc !!core::PMDConfiguration#getInputPathList() %}
- {% jdoc !!core::PMDConfiguration#setInputPaths(List) %} - It is now superseded by {% jdoc !!core::PMDConfiguration#setInputPathList(List) %}
- {% jdoc !!core::PMDConfiguration#addInputPath(String) %} - It is now superseded by {% jdoc !!core::PMDConfiguration#addInputPath(Path) %}
- {% jdoc !!core::PMDConfiguration#getInputFilePath() %} - It is now superseded by {% jdoc !!core::PMDConfiguration#getInputFile() %}
- {% jdoc !!core::PMDConfiguration#getIgnoreFilePath() %} - It is now superseded by {% jdoc !!core::PMDConfiguration#getIgnoreFile() %}
- {% jdoc !!core::PMDConfiguration#setInputFilePath(String) %} - It is now superseded by {% jdoc !!core::PMDConfiguration#setInputFilePath(Path) %}
- {% jdoc !!core::PMDConfiguration#setIgnoreFilePath(String) %} - It is now superseded by {% jdoc !!core::PMDConfiguration#setIgnoreFilePath(Path) %}
- {% jdoc !!core::PMDConfiguration#getInputUri() %} - It is now superseded by {% jdoc !!core::PMDConfiguration#getUri() %}
- {% jdoc !!core::PMDConfiguration#setInputUri(String) %} - It is now superseded by {% jdoc !!core::PMDConfiguration#setInputUri(URI) %}
- {% jdoc !!core::PMDConfiguration#getReportFile() %} - It is now superseded by {% jdoc !!core::PMDConfiguration#getReportFilePath() %}
- {% jdoc !!core::PMDConfiguration#setReportFile(String) %} - It is now superseded by {% jdoc !!core::PMDConfiguration#setReportFile(Path) %}
- {% jdoc !!core::PMDConfiguration#isStressTest() %} and {% jdoc !!core::PMDConfiguration#setStressTest(boolean) %} - Will be removed with no replacement.
- {% jdoc !!core::PMDConfiguration#isBenchmark() %} and {% jdoc !!core::PMDConfiguration#setBenchmark(boolean) %} - Will be removed with no replacement, the CLI will still support it.
- {% jdoc core::cpd.CPD %} and {% jdoc core::cpd.CPD.StatusCode %} - PMD 7 will ship with a revamped CLI split from pmd-core. An alterative to programatically launch CPD analysis will be added in due time.
Expand All @@ -101,6 +101,7 @@ PMD 7 will remove support for `--files` in favor of these new flags.
* [#4226](https://github.com/pmd/pmd/pull/4226): \[visualforce] Replace uses of Jorje types in pmd-visualforce - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
* [#4227](https://github.com/pmd/pmd/pull/4227): \[java] Fix #4225 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's @<!-- -->NoArgsConstructor annotation - [Lynn](https://github.com/LynnBroe) (@LynnBroe)
* [#4228](https://github.com/pmd/pmd/pull/4228): \[java] Fix #4224 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's UtilityClass - [Lynn](https://github.com/LynnBroe) (@LynnBroe)
* [#4232](https://github.com/pmd/pmd/pull/4232): \[doc] Fixing typos - [Andreas Deininger](https://github.com/deining) (@deining)

{% endtocmaker %}

6 changes: 3 additions & 3 deletions docs/pages/release_notes_old.md
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ This is a minor release.

By default, both properties are `true` to not change the default behaviour of this rule.

* The Apex rule [`EmptyCatchBlock`](https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_errorprone.html#emptycatchblock) has two new properties modeled after the analgous Java rule:
* The Apex rule [`EmptyCatchBlock`](https://pmd.github.io/pmd-6.41.0-SNAPSHOT/pmd_rules_apex_errorprone.html#emptycatchblock) has two new properties modeled after the analogous Java rule:

The `allowCommentedBlocks` property, when set to `true` (defaults to `false`), ignores empty blocks containing comments, e.g.:

Expand Down Expand Up @@ -3263,7 +3263,7 @@ See [the documentation and example](https://pmd.github.io/latest/pmd_userdocs_re
* java-errorprone
* [#2402](https://github.com/pmd/pmd/issues/2402): \[java] CloseResource possible false positive with Primitive Streams
* java-multithreading
* [#2313](https://github.com/pmd/pmd/issues/2313): \[java] Documenation for DoNotUseThreads is outdated
* [#2313](https://github.com/pmd/pmd/issues/2313): \[java] Documentation for DoNotUseThreads is outdated
* javascript
* [#1235](https://github.com/pmd/pmd/issues/1235): \[javascript] Use of let results in an Empty Statement in the AST
* [#2379](https://github.com/pmd/pmd/issues/2379): \[javascript] Support for-of loop
Expand Down Expand Up @@ -7532,7 +7532,7 @@ public class Foo {
Detects hardcoded credentials used in requests to an endpoint.

You should refrain from hardcoding credentials:
* They are hard to mantain by being mixed in application code
* They are hard to maintain by being mixed in application code
* Particularly hard to update them when used from different classes
* Granting a developer access to the codebase means granting knowledge
of credentials, keeping a two-level access is not possible.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ public Object visit(ASTIfStatement node, Object data) {
* PLSQL AST now has explicit ELSIF and ELSE clauses All of the
* ELSE_END_STATEMENTS in an IF clause should point to the outer last
* clause because we have to convert a single PL/SQL IF/ELSIF/ELSE
* satement into the equivalent set of nested Java if/else {if/else
* statement into the equivalent set of nested Java if/else {if/else
* {if/else}} statements
*/
List<ASTElsifClause> elsifs = node.findChildrenOfType(ASTElsifClause.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ public Object visit(ASTArgumentList node, Object data) {
}
}

// closing paranthesis should be on a new line
// closing parenthesis should be on a new line
Node primaryExpression = node.getNthParent(3);
if (primaryExpression.getEndLine() != node.getEndLine() + 1) {
addViolationWithMessage(data, primaryExpression, "Closing paranthesis should be on a new line.");
addViolationWithMessage(data, primaryExpression, "Closing parenthesis should be on a new line.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,11 @@ END;
</test-code>

<test-code>
<description>Calling a procedure / function - closing paranthesis should be on a new line</description>
<description>Calling a procedure / function - closing parenthesis should be on a new line</description>
<expected-problems>1</expected-problems>
<expected-linenumbers>3</expected-linenumbers>
<expected-messages>
<message>Closing paranthesis should be on a new line.</message>
<message>Closing parenthesis should be on a new line.</message>
</expected-messages>
<code><![CDATA[
BEGIN
Expand Down

0 comments on commit 44cc43c

Please sign in to comment.