Closed prnewman closed 7 years ago
This works for me, can you setup a sample project with this issue? Thanks!
@marcelofabri Thanks, I'll try to come up with something.
I added Swiftlint to a new project and the warnings appear in the Xcode editor. So I'll have to figure out what's different about the project where the warnings do not appear. Thanks for your help!
Thanks! Please share the outcome of your research later 😉
@marcelofabri Incredibly, the issue was resolved by removing the included section from the swiftlint yaml file:
included: # paths to include during linting. `--path` is ignored if present.
- WWMobile
We retained the excluded section that follows it:
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
@prnewman If you can come up with a sample project, please open a new issue. That shouldn't happen.
@marcelofabri The bug has to do with case-sensitivity.
This works:
included:
- WWMobile
This does not (notice one lowercase 'w'):
included:
- WwMobile
Sent you sample app.
I have the same issue, Xcode Version 10.1 (10B61), on two different projects ( both started from scratch).
Funny thing is, one of my past co-workers didn't experienced the issue, on the same project I did, so same configuration file,
Maybe there are some Xcode settings responsible for this issue here?
totally deleting my included
section made the errors show up immediately. Then I realized it was because my included
section was getting the file paths wrong. Swiftlint was robust enough to still show the errors in the navigation, but I had to make sure all my paths were relative to .swiftlint.yml and case-sensitive
totally deleting my
included
section made the errors show up immediately. Then I realized it was because myincluded
section was getting the file paths wrong. Swiftlint was robust enough to still show the errors in the navigation, but I had to make sure all my paths were relative to .swiftlint.yml and case-sensitive
doesn't change anything for me. Still the same thing, errors shown only in logs, but not in the editor.
totally deleting my
included
section made the errors show up immediately. Then I realized it was because myincluded
section was getting the file paths wrong. Swiftlint was robust enough to still show the errors in the navigation, but I had to make sure all my paths were relative to .swiftlint.yml and case-sensitivedoesn't change anything for me. Still the same thing, errors shown only in logs, but not in the editor.
For me too, still facing the same problem in the project even removing Excluded and Included
A quick sanity check for other people that are running into this: make sure you have the reporter
property in your .swiftlint.yaml
file set to "xcode"
. If you've been playing around with getting this to work in the AppCode IDE then you might have this property set to "csv"
instead, and that of course won't make the errors show up in Xcode 😄
nothing changed all this time, still the same bug
I hate when people do this, but I also have the same problem. I think this issue needs to be reopened. I might just create a new issue with the same info, and link to this if it doesn't reopen.
macOS: 10.14.6 AppCode: 2019.3.2 Swiftlint For AppCode: 1.10.3 Swiftlint Command Line: 0.38.1
@gwsounddsg yes please open a new issue, you appear to be having issues integrating SwiftLint with AppCode, which is separate than the issue originally reported in this thread.
SwiftLint is an amazing tool, but my team has been unable to get the warnings and errors to appear in Xcode 8.3.2 after adding a build phase as described here:
https://github.com/realm/SwiftLint#xcode
We get SwiftLint's output in Xcode's Report Navigator, but when you drill down to the offending line in a class, it is not highlighted yellow or red as you would expect:
https://github.com/realm/SwiftLint#defining-custom-rules
For what it's worth, if we lint using Tailor in the build phase, the classes are highlighted with the corresponding warnings.