HubSpot / prettier-maven-plugin

Apache License 2.0
116 stars 23 forks source link

fix log parsing for files with "error" in the path #100

Closed jaredstehler closed 10 months ago

jaredstehler commented 10 months ago

Currently, the stderr parsing logic treats any line containing "error" as an error, but this includes non-error log lines for files with error in the path (i.e. /foo/bar/error/MyErrorHandler.java)

As a consequence, you'll see this for a non-errored bad-formatting state:

[INFO] --- prettier:0.21-SNAPSHOT:check (check) @ team-error-prone-checks ---
[INFO] Using customized nodePath: /opt/build-deps/node-18.7.0/bin/node
[INFO] Using customized npmPath: /opt/build-deps/node-18.7.0/lib/node_modules/npm/bin/npm-cli.js
[ERROR] src/main/java/com/hubspot/error/prone/checks/ValidateAnnotation.java
[ERROR] src/main/java/com/hubspot/error/prone/checks/ValidateMethodAnnotation.java
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
...
[ERROR] Failed to execute goal com.hubspot.maven.plugins:prettier-maven-plugin:0.21-SNAPSHOT:check (check) on project team-error-prone-checks: Error trying to run prettier-java: 1 -> [Help 1]

@jhaber @stevie400 @Xcelled

jhaber commented 10 months ago

🤦 thanks for the fix!