swift icon indicating copy to clipboard operation
swift copied to clipboard

SwiftLint only modified lines

Open rarias84 opened this issue 2 years ago • 2 comments

I can get which line was modified and show it in the PR, but still have the report, what I want is to pass the modified/created files and get only the new warning introduced or prevent to create the report in the PR and I can handle the message.

rarias84 avatar Feb 17 '23 10:02 rarias84

You probably want to run SwiftLint in-memory on the old version of the app, then run it on the new version of the app - compare the results and remove anything which isn't within the diff

There's enough info in the DSL to do that, you'd just need to look into how to run SwiftLint on the old files (or store the last results somewhere and pick that up)

orta avatar Feb 17 '23 12:02 orta

I want to do it in circleci and its seems that git diff doesn't work properly neither git blame.

rarias84 avatar Feb 20 '23 16:02 rarias84