-
Notifications
You must be signed in to change notification settings - Fork 198
Configure eslint for warnings-ng to report on CI #935
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
Conversation
42d72e9
to
72392fd
Compare
plugin/pom.xml
Outdated
<maven.test.failure.ignore>false</maven.test.failure.ignore> | ||
<testFailureIgnore>${maven.test.failure.ignore}</testFailureIgnore> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be in plugin-pom
?
Safer to configure this in build/plugins/*/configuration
than to rely on setting a generic-sounding property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the opting in to say that that we have configured test/lint properly for Jenkins build reporting. It is in plugin-pom
here: https://github.com/jenkinsci/plugin-pom/pull/1016/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8R149
We could prefix it, e.g. something like:
<maven.test.failure.ignore>false</maven.test.failure.ignore> | |
<testFailureIgnore>${maven.test.failure.ignore}</testFailureIgnore> | |
<maven.test.failure.ignore>false</maven.test.failure.ignore> | |
<frontend.testFailureIgnore>${maven.test.failure.ignore}</frontend.testFailureIgnore> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think prefixing it would be prudent. As written it looks like it is a magic property name interpreted by some unknown mojo. But https://github.com/eirslett/frontend-maven-plugin?tab=readme-ov-file#ignoring-failure seems to imply that regular maven.test.failure.ignore
is honored? https://github.com/eirslett/frontend-maven-plugin/blob/4a501a10677716a0e6676b603e3b93bc6bf319f1/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java#L33-L40 so why do we even need to configure the plugin specially for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this still does not make sense to me and the link did not clear it up. There should be a /build/plugins/plugin
section for frontend-maven-plugin
with configuration
rather than using a magic property name which does not even mention frontend.
Current trunk prefixes it https://github.com/jenkinsci/plugin-pom/blob/c4f78bcc60b0fe92a86f9d971de2b5e05caa513b/README.md?plain=1#L197 https://github.com/jenkinsci/plugin-pom/blob/c4f78bcc60b0fe92a86f9d971de2b5e05caa513b/pom.xml#L170 https://github.com/jenkinsci/plugin-pom/blob/c4f78bcc60b0fe92a86f9d971de2b5e05caa513b/pom.xml#L1232
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC it was to make it opt-in and to allow us to control it in the plugin-pom at a later date to change the default i.e. remove the configuration.
It was opt-in because if a plugin picked up the change and hadn't configured it then lint issues would silently fail and not be reported, worse than the status quo.
@jglick any thoughts on bumping to parent pom 5.0? Requires updating the minimum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of date. Sorry, do not recall seeing this before forgot this existed.
"babel-loader": "^9.0.1", | ||
"clean-webpack-plugin": "^4.0.0", | ||
"css-loader": "^5.0.0", | ||
"eslint": "^8.41.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI #1014 (comment) beyond my skill level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#935 (comment) unless I am missing something
To be clear, the effect of this PR would be that
right? |
This reverts commit b971b8e.
see jenkinsci/plugin-pom#874
Depends on jenkins-infra/pipeline-library#883 pipeline library to add:
https://github.com/jenkinsci/jenkins/blob/master/Jenkinsfile#L175C33-L179
and jenkinsci/plugin-pom#1016
Testing done
Introduced lint warnings locally with both CI and not CI.
Tested with PR of pipeline library showing that reporting is correct
Tested with SNAPSHOT of parent pom showing that new opt-in method works:
Submitter checklist