Skip to content

Commit 5e31d42

Browse files
authored
Merge pull request #119 from smartmobilefactory/feature/explicit_acl_frameworks
Feature/explicit acl frameworks
2 parents a16a183 + 189c0b0 commit 5e31d42

3 files changed

Lines changed: 28 additions & 1 deletion

File tree

SwiftLint/copy-and-run-swiftlint-config.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ if [ $isFramework = true ]; then
237237
# Merge the Frameworks specific configuration.
238238
merge_swiftlint_configuration "swiftlint+frameworks.yml" "$tmpFile" "--write-to-file" "$tmpFile.frameworks"
239239
mv "$tmpFile.frameworks" "$tmpFile"
240+
241+
if [ -e "$projectDir/Unit-Tests" ]; then
242+
cp "swiftlint+frameworksUnitTest.yml" "$projectDir/Unit-Tests/.swiftlint.yml"
243+
elif [ -e "$projectDir/UnitTests" ]; then
244+
cp "swiftlint+frameworksUnitTest.yml" "$projectDir/UnitTests/.swiftlint.yml"
245+
fi
240246
fi
241247

242248
# Comment out the disabled custom rules from the configuration file

SwiftLint/swiftlint+frameworks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ excluded:
1919

2020
# optional rules that need to be manually opt-in to be used
2121
opt_in_rules:
22-
- explicit_top_level_acl
22+
- explicit_acl
2323
- missing_docs
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
###
2+
# swiftlint+frameworks.yml
3+
# For a framework project only
4+
#
5+
# This file gets copied in Unit-Tests or UnitTests folder.
6+
#
7+
# Important File Information:
8+
# - The order of the section is important and must be maintained (1-disabled_rules, 2-excluded, 3-opt_in_rules).
9+
# - There must be an empty line between each section.
10+
# - There must be an empty line at the end of the file.
11+
# - [Indentation] There should be 2 whitespaces before each rule declaration (" ").
12+
13+
# rule identifiers to exclude from running
14+
disabled_rules:
15+
- explicit_acl
16+
17+
# paths to ignore during linting. overridden by `included`.
18+
excluded:
19+
20+
# optional rules that need to be manually opt-in to be used
21+
opt_in_rules:

0 commit comments

Comments
 (0)