Skip to content

Conversation

@jpsim
Copy link
Collaborator

@jpsim jpsim commented Sep 13, 2022

No description provided.

@SwiftLintBot
Copy link

1 Warning
⚠️ If this is a user-facing change, please include a CHANGELOG entry to credit yourself!
You can find it at CHANGELOG.md.
12 Messages
📖 Linting Aerial with this PR took 1.17s vs 1.17s on main (0% slower)
📖 Linting Alamofire with this PR took 1.45s vs 1.44s on main (0% slower)
📖 Linting Firefox with this PR took 6.51s vs 6.5s on main (0% slower)
📖 Linting Kickstarter with this PR took 9.13s vs 9.17s on main (0% faster)
📖 Linting Moya with this PR took 0.66s vs 0.66s on main (0% slower)
📖 Linting Nimble with this PR took 0.64s vs 0.63s on main (1% slower)
📖 Linting Quick with this PR took 0.3s vs 0.3s on main (0% slower)
📖 Linting Realm with this PR took 11.18s vs 10.93s on main (2% slower)
📖 Linting SourceKitten with this PR took 0.52s vs 0.51s on main (1% slower)
📖 Linting Sourcery with this PR took 2.31s vs 2.3s on main (0% slower)
📖 Linting Swift with this PR took 4.28s vs 4.3s on main (0% faster)
📖 Linting WordPress with this PR took 10.77s vs 10.9s on main (1% faster)

Here's an example of your CHANGELOG entry:

* Add `--correctable-only` flag to lint and analyze commands.  
  [jpsim](https://github.com/jpsim)
  [#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)

note: There are two invisible spaces after the entry's text.

Generated by 🚫 Danger

@yan-zaitsev-hs
Copy link

@jpsim changes looks good.
I expect I can define branch in in my Podfile and it should be enough to try new version?

@jpsim
Copy link
Collaborator Author

jpsim commented Sep 14, 2022

Ugh, no the CocoaPods integration is a huge hack, it just works with binary releases.

literally any other installation method works though. Mint, bazel, SwiftPM, Makefile.

@yan-zaitsev-hs
Copy link

I am not sure if it works.
I build the source codes using the make and use next command:

$ "/Users/zaitsevyan/Downloads/SwiftLint-add-correctable-only-flag-to-lint-and-analyze-commands/.build/arm64-apple-macosx/release/swiftlint" lint --correctable-only --path <redacted>/Appdelegate/AppDelegate.swift 
warning: The --path option is deprecated. Pass the path(s) to lint last to the swiftlint command.
Linting Swift files at paths <redacted>/Appdelegate/AppDelegate.swift
Linting 'AppDelegate.swift' (1/1)
/<redacted>/Appdelegate/AppDelegate.swift:30:24: warning: Colon Spacing Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
<redacted>/Appdelegate/AppDelegate.swift:32:5: error: Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'x' (identifier_name)
Done linting! Found 2 violations, 1 serious in 1 file.
MacBook-Pro-3:mono-ios zaitsevyan$ 

Screen Shot 2022-09-14 at 15 52 18

I don't expect to see identifier_name error with --correctable-only parameter.

I want to run this command as part of my script to lint only correctable errors and exit if there is a lint issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants