You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stormcrawler.apache.org by "sigee (via GitHub)" <gi...@apache.org> on 2025/10/12 15:21:20 UTC
[PR] Introduce checkstyle [stormcrawler]
sigee opened a new pull request, #1689:
URL: https://github.com/apache/stormcrawler/pull/1689
To make code style more consistent I added the same checkstyle rules Storm has.
The severity is set to warning (in Storm as well), so there is no errors yet when the rules are violated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Introduce checkstyle [stormcrawler]
Posted by "sigee (via GitHub)" <gi...@apache.org>.
sigee merged PR #1689:
URL: https://github.com/apache/stormcrawler/pull/1689
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Introduce checkstyle [stormcrawler]
Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #1689:
URL: https://github.com/apache/stormcrawler/pull/1689#issuecomment-3394772604
Is the rule set consistent with `git-code-format:format-code`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Introduce checkstyle [stormcrawler]
Posted by "sigee (via GitHub)" <gi...@apache.org>.
sigee commented on PR #1689:
URL: https://github.com/apache/stormcrawler/pull/1689#issuecomment-3395086633
> Is the rule set consistent with `git-code-format:format-code`?
I haven't checked all of them, but most of them yes. As I saw it just extend/add more rule. E.g.: 'package' should be separated from previous line. Which is in some of the case true, but some of the case not in this project.
See: [FeedParserBolt.java](https://github.com/apache/stormcrawler/blob/main/core/src/main/java/org/apache/stormcrawler/bolt/FeedParserBolt.java#L17) vs. [JSONResource.java](https://github.com/apache/stormcrawler/blob/main/core/src/main/java/org/apache/stormcrawler/JSONResource.java#L1)
Even the license header is at the different place of the files. :(
But you are right, I'll check them all to be sure, there is no contradiction.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Introduce checkstyle [stormcrawler]
Posted by "sigee (via GitHub)" <gi...@apache.org>.
sigee commented on PR #1689:
URL: https://github.com/apache/stormcrawler/pull/1689#issuecomment-3411359377
Well, we use git-code-format-maven-plugin with the config of aosp true. It means the code style should be as described here: https://source.android.com/docs/setup/contribute/code-style#order-import-statements
To be compatible with the AOSP Java code style.
First, I replaced the checkstyle rules to the [Checkstyle configuration for 'Google Java Style'](https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml), because the [guideline](https://source.android.com/docs/setup/contribute/code-style#java-language-rules) says "Android follows standard Java coding conventions with the additional rules described below."
Then I changed the indentation from 2 to 4 as the [guideline](https://source.android.com/docs/setup/contribute/code-style#use-spaces-for-indentation) says.
Finally I checked the issues checkstyle reported for [FeedParserBolt.java](https://github.com/apache/stormcrawler/blob/main/core/src/main/java/org/apache/stormcrawler/bolt/FeedParserBolt.java) and fixed them as example. See last 6 commits.
These are not against git-code-format-maven-plugin, but can improve the readability of the code and even the documentation by requiring certen javadoc format rules. E.g.: It should contain sentences.
Note: There are lots of similar warnings as I fixed as examples in the whole project reported by checkstyle.
E.g.: Separate copyright and package by a blank line as described in the [guideline](https://source.android.com/docs/setup/contribute/code-style#use-javadoc-standard-comments)
What do you think about these now?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@stormcrawler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org