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

Enable check style for the project #820

Closed
97 tasks done
RobertIndie opened this issue Nov 30, 2022 · 8 comments · Fixed by #853 or #893
Closed
97 tasks done

Enable check style for the project #820

RobertIndie opened this issue Nov 30, 2022 · 8 comments · Fixed by #853 or #893
Assignees
Labels
backend Everything that is related to the StreamPipes backend help wanted Extra attention is needed
Milestone

Comments

@RobertIndie
Copy link
Member

RobertIndie commented Nov 30, 2022

Body

This is the issue to track the progress of check-style enablement for all modules.
If you want to take over some of the modules, please feel free to leave a comment here. And thanks for all your contribution! 😃

Only the first level of sub-modules are listed here. If you feel that some of the modules(eg. streampipes-extensions) are heavy, please continue to split them into smaller tasks in this issue.

Note: The above todo tasks are generated by the command mvn --also-make dependency:tree | grep maven-dependency-plugin | awk '{ print "- [ ] "$(NF-1) }' . Please tell me if there are any problems.

StreamPipes Committer

  • I acknowledge that I am a maintainer/committer of the Apache StreamPipes project.
@tenthe
Copy link
Contributor

tenthe commented Dec 1, 2022

Hey @RobertIndie,
I'll start with the module streampipes-rest.
How can I link the subtask (TODO) to pull requests?

@RobertIndie
Copy link
Member Author

Hi @tenthe

How can I link the subtask (TODO) to pull requests?

You can edit my Issue description and paste your PR link to the sub-task. And as you are doing now, you can link to this issue in your PR description.

@tenthe
Copy link
Contributor

tenthe commented Dec 5, 2022

Hi all, I just enabled checkstyle in the module streampipes-processors-geo-jvm.
There we have the case that some files have a different license (MIT). Further, there are other checkstyle violations (e.g. an author in comments) that we can't remove.
How can we deal with such cases?

Examples:

  • org.apache.streampipes.processors.geo.jvm.processor.revgeocoder.geocode.kdtree;
  • com.kohlschutter.boilerpipe

The changes are in PR #850

@tenthe
Copy link
Contributor

tenthe commented Dec 6, 2022

@RobertIndie, currenlty I refactor the streampipes-extensions module.
I just found out that the command mvn validate no longer returns an error when there is a checkstyle problem.
(e.g. mvn validate -f streampipes-extensions/streampipes-processors-text-mining-flink)
Could this be related to the changes in #851 or is there something I am doing wrong?

Do I need to configure anything in the module streampipes-extensions?
I only added this to all submodules:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
</plugin>

@RobertIndie
Copy link
Member Author

Hi @tenthe Thanks for your comment.

I just found out that the command mvn validate no longer returns an error when there is a checkstyle problem.

I have created a PR to fix it: #853

@RobertIndie
Copy link
Member Author

Hi, @tenthe

There we have the case that some files have a different license (MIT). Further, there are other checkstyle violations (e.g. an author in comments) that we can't remove.
How can we deal with such cases?

How about suppressing these files here: https://github.com/apache/streampipes/blob/dev/tools/maven/suppressions.xml
I also found a way to apply different rules to different files: https://stackoverflow.com/questions/25894431/checkstyle-different-rules-for-different-files . But it may introduce some complexity.

@bossenti
Copy link
Contributor

bossenti commented Dec 7, 2022

Personally, I would prefer option 1 and only suppress the affected rules working with as less wildcards as possible.
The second option can get easily confusing, as fas as I can imagine

@tenthe
Copy link
Contributor

tenthe commented Dec 7, 2022

Ok, thans to the both of you. I used the first option and added it to PR #850.
This PR should (hopefully) contain all checkstyle fixes for the streampipes-extension module

tenthe added a commit that referenced this issue Dec 9, 2022
…lements

[#820] enable checkstyle for some extension modules
@bossenti bossenti added the deprecation Assigned to pull requests or issues that introduce a deprecation. label Dec 12, 2022
RobertIndie added a commit that referenced this issue Dec 13, 2022
[#820] Enable checkstyle for streampipes-config and add suppress support for checkstyle
RobertIndie added a commit that referenced this issue Dec 13, 2022
[#820] Enable checkstyle for streampipes-dataformat-*
tenthe added a commit that referenced this issue Dec 17, 2022
[#820] add checkstyle to streampipes-security-jwt
tenthe added a commit that referenced this issue Dec 17, 2022
[#820] Activate checkstyle for streampipes-measurement-units
@bossenti bossenti removed the deprecation Assigned to pull requests or issues that introduce a deprecation. label Dec 21, 2022
bossenti added a commit that referenced this issue Dec 21, 2022
* add checkstyle to streampipes-connect-container-master (#820)

* add checkstyle to streampipes-platform-services (#820)

* add checkstyle to streampipes-backend (#820)

* add checkstyle to streampipes-client (#820)

* fix checkstyle issue
bossenti added a commit that referenced this issue Dec 23, 2022
* remove suppression for vocabulary

* add checkstyle to streampipes-wrapper

* add checkstyle to streampipes-wrapper-standalone

* add checkstyle to streampipes-wrapper-distributed

* add checkstyle to streampipes-wrapper-flink

* add checkstyle to streampipes-wrapper-kafka-streams

* add checkstyle to streampipes-wrapper-python

* [hotfix] Fix checkstyle problems

Co-authored-by: Philipp Zehnder <[email protected]>
@bossenti bossenti linked a pull request Dec 25, 2022 that will close this issue
@bossenti bossenti added this to the 1.0.0 milestone Dec 25, 2022
@bossenti bossenti added the backend Everything that is related to the StreamPipes backend label Dec 25, 2022
@bossenti bossenti modified the milestones: 1.0.0, 0.91.0 Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Everything that is related to the StreamPipes backend help wanted Extra attention is needed
Projects
None yet
3 participants