Skip to main content
0 votes
0 answers
41 views

SwiftLintBuildToolPlugin doesn't have a bundle identifier

I integrated SwiftLint into my HelloWorld app to explore how I can incorporate it into my development and CI flow. While it works during development, I face a problem in my pipeline during archiving. ...
netshark1000's user avatar
  • 7,433
0 votes
0 answers
45 views

What is the scope of the sandbox when running build tool plugins in Xcode? How can I tell which SwiftLint file Xcode is reading?

I have a project in a multi-platform app that uses two local packages. I have the folders set up like so Project/ .swiftformat .swiftlint_strict.yml .swiftlint.yml Platforms/ iOS/ ...
CalebK's user avatar
  • 715
1 vote
0 answers
72 views

SwiftLint (SPM) Auto-correction for Trailing Whitespace Not Working Due to Sandbox Restrictions

I am using SwiftLint via Swift Package Manager (SPM) in my Xcode project and would like to enable automatic correction for removing whitespace in empty lines. I have added the following configuration ...
Oleksandr Matrosov's user avatar
0 votes
0 answers
70 views

How can i check SwiftLint working on commit and edited file

I'm using Github action to lint the swift language and using SwiftLint for that. I want SwiftLint to check only the committed and edited files in my project. I've tried multiple solutions, but none of ...
Umer Khan's user avatar
8 votes
0 answers
4k views

identify and delete dead code in Xcode Swift

What is a .swiftlint or native approach employing a build phase script in Xcode to show a warning/error for unused functions and properties and to delete them? I have some dead dummy code left over ...
etayluz's user avatar
  • 16.5k
0 votes
1 answer
353 views

SwiftLint Invalid configuration for 'file_length'. Falling back to default

I configured .swiftlint.yml and have the following error: warning: Invalid configuration for 'line_length'. Falling back to default. Here is my configuration: ... line_length: error: 120 excluded:...
Kryštof Matěj's user avatar
0 votes
1 answer
474 views

Is there a way to change SwiftLint version in an Azure DevOps pipeline?

I'm attempting to use SwiftLint version 0.50.1 in my Azure DevOps pipeline to check iOS builds. Currently, the latest SwiftLint version is 0.53.0. However, I encountered some issues while trying to ...
Sourav's user avatar
  • 1
0 votes
0 answers
83 views

Swiftlint Rule: Project Prefix on top-level types

Is there a way to add a rule in swiftlint that will enforce every top level class, enum, struct or protocol starting with a predetermined prefix? In my case the prefix is PSO, so all my top type ...
the Reverend's user avatar
  • 12.6k
0 votes
1 answer
1k views

SwiftLint doesn't produce any warnings while code has a lot of of them

I've installed SwiftLint 0.53.0 into my pet project: export PATH="$PATH:/opt/homebrew/bin" if which swiftlint > /dev/null; then swiftlint --fix else echo "Error! Swiftlint is ...
Alexey_BH's user avatar
  • 153
1 vote
0 answers
329 views

SwiftLint rule to prefer the use of implicit self where it can be used?

In SwiftLint there is a rule for explicit_self and a rule for redundant_self_in_closure. But is there a rule would warn for overuse of self? For instance in this example... struct FooBar { let ...
Fogmeister's user avatar
  • 77.7k
0 votes
1 answer
1k views

Swiftlint allow force unwrap for hardcoded URLs while maintaining force_unwrapping rule

In my iOS porjects i use Swiftlint with the rule "force_unwrapping". But every time i need to hardcode a URL i'd like to simply force unwrap it. Is there a configuration for Swiftlint to ...
Deitsch's user avatar
  • 2,278
0 votes
0 answers
154 views

SwiftLint native rule with custom path

How can I apply the native file_name SwiftLint rule specifically to test files (files ending with test or tests in their name)?
Soheil Novinfard's user avatar
2 votes
0 answers
454 views

No Space in Method Call Violation: Don't add a space between the method name and the parentheses. (no_space_in_method_call)

I have many such warnings in the code: "No Space in Method Call Violation: Don't add a space between the method name and the parentheses. (no_space_in_method_call)" although there are no ...
Владислав Алексеевич's user avatar
1 vote
2 answers
92 views

Regex that doesn't contain is|has prefix but ends with : Bool

Sorry that I have to ask that, with all the other answers around, but I can't get my head around to think and adapt to my problem. So I'm writing a custom SwiftLint rule that should check: does not ...
bennyyy999's user avatar
2 votes
1 answer
79 views

Regex where substring isn't found in pattern in specific location

I am trying to build a (multiline) pattern for a linter, to catch cases where: There is a Text( declaration That is not followed by .appFont( declaration... ...before the next occurrence of } (end of ...
Aviel Gross's user avatar
  • 9,975

15 30 50 per page
1
2 3 4 5
14