Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 12 16:43

    romani on issue-6916-internal

    Issue #6916: fix AbstractJavado… dependency: bump org.eclipse.jg… config: add dependabot badge to… and 1 more (compare)

  • Dec 12 09:19

    pbludov on issue-7372-tidy

    Issue #7372: Re-enable Tidy (compare)

  • Dec 12 09:18

    pbludov on issue-7372-tidy

    Issue #7372: Re-enable Tidy (compare)

  • Dec 12 09:16

    pbludov on issue-7372-tidy

    Issue #7340: linkcheck reports … tmp: tidy (compare)

  • Dec 12 06:46

    pbludov on javadoc-fix

    Issue #6916: fix AbstractJavado… (compare)

  • Dec 12 06:06

    pbludov on javadoc-fix

    Issue #6916: fix AbstractJavado… (compare)

  • Dec 11 11:22

    pbludov on issue-6916-rest

    Issue #6916: migrate tests to j… Issue #6916: fix AbstractJavado… Issue #6916: migrate tests to j… (compare)

  • Dec 11 09:51

    pbludov on issue-6916-internal

    Issue #6916: migrate tests to j… (compare)

  • Dec 11 09:30

    pbludov on issue-6916-rest

    Issue #6916: migrate tests to j… Issue #6916: fix AbstractJavado… Issue #6916: migrate tests to j… (compare)

  • Dec 11 04:31

    pbludov on issue-6916-internal

    Issue #6916: migrate tests to j… Issue #6916: migrate tests to j… (compare)

  • Dec 11 04:25

    pbludov on issue-6916-checks-javadoc

    (compare)

  • Dec 11 03:03

    pbludov on issue-6916-internal

    Issue #6916: migrate tests to j… (compare)

  • Dec 11 02:39

    pbludov on issue-6916-checks-javadoc

    Issue #7301: fix image wrapping… Issue #7301: fix source display… Issue #6680: fix unexpected vio… and 5 more (compare)

  • Dec 11 02:16

    pbludov on issue-6916-xpath

    (compare)

  • Dec 11 02:10

    pbludov on issue-7339-file-prop

    (compare)

  • Dec 10 18:25

    pbludov on issue-7339-file-prop

    doc: change "property" to "type… Issue #7339: document property … (compare)

  • Dec 10 18:18

    pbludov on issue-6916-checks-javadoc

    Issue #6916: migrate tests to j… (compare)

  • Dec 10 18:15

    pbludov on issue-6916-xpath

    Issue #6916: migrate tests to j… (compare)

  • Dec 10 18:05

    pbludov on issue-6916-checks-javadoc

    Issue #6916: migrate tests to j… Issue #6916: migrate tests to j… Issue #7340: linkcheck reports … and 3 more (compare)

  • Dec 10 17:58

    pbludov on issue-6916-utils

    (compare)

Boxuan Li
@li-boxuan
I am not a checkstyle member anyway, but my advice is always using git CLI instead of github web UI. If you edit the commit message using CLI and do a force push, CI would automatically start.
Zhou Yang
@arjenzhou
Thanks for your advice and forgive my stupid question
Ullrich Hafner
@uhafner
Is there an API in checkstyle to obtain the descriptions of a bug pattern? Background: in Jenkins warnings plugin I am reading and parsing all of your xml files on my own and provide these descriptions using a small method. The drawback is that I need to update my plugin with every release of checkstyle (example jenkinsci/warnings-ng-plugin@199f83e). It would be simpler if I just could increase the version number of a dependency to checkstyle rather than copying files from your distribution.
rnveach
@rnveach
@uhafner By bug pattern it sounds like you just want descriptions of properties and/or checks? The only way to retrieve them is by looking at our xdocs, which isn't attached to any JAR as far as I know. You could automate pulling them in like we do validating their existence and types. See https://github.com/checkstyle/checkstyle/blob/master/src/test/java/com/puppycrawl/tools/checkstyle/internal/XdocsPagesTest.java .
Roman Ivanov
@romani
@uhafner , it is problem even for us, and in other plugins
we need need somebody to contribute this functionality
there are a lot of talk about this, but do not have enough heads/hands to start working on this
let me know if you are interested to join and start working on this feature
Ullrich Hafner
@uhafner
I can provide a pull request, yes. I already have this code running in my plug-in, would make sense to have it directly in checkstyle. What would be a good package/place for this code?
rnveach
@rnveach
@uhafner start an issue with what you need/want, and formats you would want this to be in, and we'll start talking about the specifics.
Dustin Singleton
@Singleton06
Quick question... We are trying to track the progress of checkstyle reports from one commit to another. We have a nice chunk of technical debt so updating everything right now isn't feasible and one solution we have found is to just commit the report for other tools such as findbugs/spotbugs. The only thing that really changes between builds is the number of issues found, etc, so a new commit would show any newly introduced issues. We were hoping to do this with checkstyles, but it seems that the full path is specified of the file where the violations occur in the report. I wasn't able to find it, but perhaps I'm just missing it. I'd like to change the path of the file to be relative to the build in the report that is produced.
rnveach
@rnveach
@Singleton06 You can set the relative directory by specifying baseDir in the Checker configuration.
See http://checkstyle.sourceforge.net/config.html#Checker_Properties
If everyone's base is different, you can specify it through a system property and have the configuration pick up it's value from there by specifying ${propertyName}.
Dustin Singleton
@Singleton06
Correct me if I'm wrong, but would that require everyone have to specify this property?
Dustin Singleton
@Singleton06
and to clarify, the check is getting performed as desired, I would just like the report to not contain the full path so that the report doesn't change between a run on one machine from another (which do have different bases).
Thanks for the help @rnveach
rnveach
@rnveach
@Singleton06 Yes everyone would have to specify it to give it to the configuration. If your using maven, there may be some magic where it is easier to set it up in the maven config so it happens automatically, but the CLI doesn't know where your base directory is. So someone needs to tell it.
When you say report, do you mean the XML output with -f xml?
Roman Ivanov
@romani
so a new commit would show any newly introduced issues
@Singleton06 , if end up with some solution , it would be awesome if you can share it
A lot of people strugling with incremental checksyle validation enforcement
It might be better to create special Filter in our library that take report from previous execution as suppression file
We even can create new AuditListener that generate suppression xml file based on all violations that are found
Roman Ivanov
@romani
so build on master will generate such artifact file, all PullRequests will use it as base suppression, all new violations will fail a build
If you have time to make it happen, we can switch to issue tracker and discuss details
Dustin Singleton
@Singleton06

@romani - yeah, that's basically what we're doing, with just a bit more of a manual process. We are checking in the violations and then any updates to that file result in a change in SCM, and we call it out on PRs and things like that.

Setting up a file to be a suppression would be a great idea, but I wonder if it's feasible since changing code around something would cause the lines where the violations that occur to be changed.

rnveach
@rnveach
@Singleton06 newer suppressions use xpath instead of line/column, but not all checks support it yet.
Dustin Singleton
@Singleton06

interesting. So you could have a build that produces the "suppression" file that could then be fed back into future builds.

I think this would work well. The only thing that I would say that would beneficial with this is to have some way of notifying if there was an unnecessary suppression. It would help to identify situations where an issue has been fixed but the suppression file wasn't updated.

rnveach
@rnveach
@Singleton06 we have an issue on just that but it requires other pieces in place first
Ullrich Hafner
@uhafner
Wouldn’t it make more sense if this incremental feature is one abstraction higher and not in the CheckStyle library? I have implemented such a feature in Jenkins warnings plugin and it works quite well for CheckStyle (and SpotBugs, PMD, etc.). I.e. the CI tool selects the baseline report that can be used to compare the current results with. The delta algorithm has as input the reports of the baseline and the current build (independent of the used static analysis tool) and is capable of producing a report that identifies new and outstanding warnings.
And one note to checkstyle/checkstyle#3242: it would be quite valuable for my warnings plugin if I can visualize all used suppressions. So if checkstyle suppresses a warning it would be a nice additional feature if that would be part of some (additional and optional) report (PMD does this…)
Dustin Singleton
@Singleton06
Personally, I think I would prefer that it be part of checkstyle. I think that gives more freedom for other tools to make usage of it. We would like to incorporate it into our maven builds, but wouldn't be opposed to also seeing it in jenkins builds, etc, but it's just not our primary use-case.
Ullrich Hafner
@uhafner
I see. Note that the library to create the diff is independent of Jenkins and might be used in a plain maven plugin as well. Otherwise you would reinvent the wheel in CheckStyle (and in every other static analysis tool). And creating the diff is a non trivial task.
Dustin Singleton
@Singleton06
The comparison is not really the part that I'm too interested in. I basically want a way to take a snapshot of the current state of the project and make sure that any additional commits do not worsen the state of the project.
Therefore, if I have a way to output a suppression file that would cause a build of that same project to find no violations, that achieves the goal I'm looking for.
Ullrich Hafner
@uhafner
I understand, this is the simple way to implement such a feature (this is a approach that I started with as well). It is not refactoring-aware but will work in most other cases.
Roman Ivanov
@romani
code freeze for release 8.15 - no merges to master brnach
Roman Ivanov
@romani
Release is done
Jonathan Leitschuh
@JLLeitschuh
@romani Please check the private message I just sent you. I have an urgent issue I need to discusss with you and the checkstyle team privately.
Roman Ivanov
@romani
=======
code freeze .... while I am doing 8.16 release
====
Roman Ivanov
@romani
code freeze for 8.17 release
Roman Ivanov
@romani
Sheng Chen
@jdneo
Hi team, I have a question about the Eclipse Checkstyle plugin. The plugin use ASTVisitor to modify the AST, thus correct the Checkstyle violations. Is it possible to extract these visitors into a separate jar files for distribution? I'm trying to implement a Checkstyle extension in VS Code and I wish I can use these components as part of the dependencies instead of copying the code.
Sheng Chen
@jdneo
demo.gif
Above is the gif of the POC I have implemented for now
rnveach
@rnveach
@jdneo ASTVisitor is not a creation of checkstyle or eclipse-cs. It is made by eclipse and in their jars. You would have to find those and extract them to use them.
Sheng Chen
@jdneo