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

Optionally log warnings to Checkstyle XML #14

Open
totten opened this issue Jun 21, 2023 · 0 comments
Open

Optionally log warnings to Checkstyle XML #14

totten opened this issue Jun 21, 2023 · 0 comments

Comments

@totten
Copy link
Member

totten commented Jun 21, 2023

"Checkstyle XML" is a quasi-standard format used by tools like phpcs, jshint, or Jenkins to share a list of code-formatting issues. Here's a representative example of the format:

<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="3.7.1">
<file name="/private/tmp/z.php">
 <error line="4" column="3" severity="error" message="The extends keyword must be on the same line as the class name" source="Drupal.Classes.ClassDeclaration.ExtendsLine"/>
</file>
</checkstyle>

Currently, civistrings does some validation and prints warnings - but it doesn't give structured information.

Ideally, there would be an option to send these warnings to a file (civistrings --checkstyle=output.xml *.php).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant