jenkinsci / violation-comments-to-stash-plugin

Comments Bitbucket Server (or Stash) pull requests with static code analyzer findings.
https://plugins.jenkins.io/violation-comments-to-stash
MIT License
43 stars 16 forks source link

Feature: ignore certain folders/paths/globs #72

Closed bgotink closed 3 years ago

bgotink commented 4 years ago

I use this plugin to get eslint warnings in pull requests, but in PRs that contain a lot of changed files (1,000+) that eslint doesn't comment on (in our case: zipfiles) this violation command takes a very long time doing over 1,000 unneeded HTTP requests. This takes easily over 15 minutes if Jenkins / the network / BitBucket is already under a higher than normal load.

It would help a lot if we could tell the command that changes to zipfiles—alternatively, the .yarn/cache folder—won't trigger any warnings so it can skip those.

tomasbjerre commented 4 years ago

Sounds like you have .yarn/cache committed in version control? You are talking about all the HTTP requests taking a lot of time right?

bgotink commented 4 years ago

Sounds like you have .yarn/cache committed in version control?

Indeed. We're using yarn 2, which—by default—places its cache inside the repository. It's a tradeoff between repo size and speed of yarn install / dependency on the npm registry.

You are talking about all the HTTP requests taking a lot of time right?

Yes, the 1,000+ HTTP requests that the plugin makes for those zipfiles take a long time.

tomasbjerre commented 3 years ago

There is such an option now. Released as 1.126.

   ignorePaths: [
       [path: 'node_modules'],
       [path: '.yarn']
   ],
bgotink commented 3 years ago

Great, thanks!