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

Support checkstyle format / GithubActions annotations #86

Closed
staabm opened this issue Jan 27, 2020 · 2 comments
Closed

Support checkstyle format / GithubActions annotations #86

staabm opened this issue Jan 27, 2020 · 2 comments
Labels
enhancement New feature or request 🔒 on hold

Comments

@staabm
Copy link
Contributor

staabm commented Jan 27, 2020

GithubActions supports annotations within changed files.
These can be achieved with https://github.com/staabm/annotate-pull-request-from-checkstyle when the tool in question supports output in the checkstyle format.

That means one can actually see errors detected by the tool on a per line basis in the „files changed“ tab of a pull request (see screenshots in the repo)

See https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/acc2aad7ceb544a414c9c87587d688393649a9c4/src/Report/CheckstyleReporter.php#L41 as a reference implementation

@staabm staabm added the enhancement New feature or request label Jan 27, 2020
@carlosas
Copy link
Owner

carlosas commented Jan 27, 2020

Hi. It's a good enhancement. The tool is kind of ready to create a second output implementation, but there would be some things to change on the current behaviour:

  • Save every occurrence of a dependency in the AST (currently only saved once) and performe the unique check in the mustOnly and canOnly assertions.
  • Save the line of the occurrence in the AST.
  • Implement the CheckstyleOutput from OutputInterface.
  • Create an option to chose an output (or more than one maybe).

Since I'm refactoring a bit the AST collectors, I will start implementing the first 2 steps ASAP. I will put the issue on hold until this previous steps are done.

Thank you!

@carlosas
Copy link
Owner

PHPat has been rebuilt as a PHPStan extension (v0.10). This feature is now included 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🔒 on hold
Projects
None yet
Development

No branches or pull requests

2 participants