From 84531b71f4e74251eff9fa57e9862ce59e6b0d99 Mon Sep 17 00:00:00 2001 From: Pedro Date: Tue, 13 Aug 2024 17:39:30 +0200 Subject: [PATCH] Fix linting issues --- .swiftformat | 42 +++++++++++++++++++ .swiftlint.yml | 24 +++++++++++ Package.swift | 2 +- Project.swift | 2 +- .../AppleBundleSizeAnalyzer.swift | 1 + Tuist/Config.swift | 4 +- 6 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 .swiftformat create mode 100644 .swiftlint.yml diff --git a/.swiftformat b/.swiftformat new file mode 100644 index 0000000..6d1ce69 --- /dev/null +++ b/.swiftformat @@ -0,0 +1,42 @@ +# file options + +--symlinks ignore +--disable hoistAwait +--disable hoistTry +--swiftversion 5.7 + +# format options + +--allman false +--binarygrouping 4,8 +--closingparen balanced +--commas always +--comments indent +--decimalgrouping 3,6 +--elseposition same-line +--empty void +--exponentcase lowercase +--exponentgrouping disabled +--extensionacl on-declarations +--fractiongrouping disabled +--header strip +--hexgrouping 4,8 +--hexliteralcase uppercase +--ifdef indent +--indent 4 +--indentcase false +--importgrouping testable-bottom +--linebreaks lf +--octalgrouping 4,8 +--operatorfunc spaced +--patternlet hoist +--ranges spaced +--self remove +--semicolons inline +--stripunusedargs always +--trimwhitespace always +--maxwidth 130 +--wraparguments before-first +--wrapcollections before-first +--wrapconditions after-first +--wrapparameters before-first \ No newline at end of file diff --git a/.swiftlint.yml b/.swiftlint.yml new file mode 100644 index 0000000..42dbd48 --- /dev/null +++ b/.swiftlint.yml @@ -0,0 +1,24 @@ +disabled_rules: + - trailing_whitespace + - trailing_comma + - nesting + - cyclomatic_complexity + - file_length + - todo + - function_parameter_count + - opening_brace + - line_length +identifier_name: + min_length: + error: 1 + warning: 1 + max_length: + warning: 60 + error: 80 +inclusive_language: + override_allowed_terms: + - masterKey +type_name: + min_length: + error: 1 + warning: 1 \ No newline at end of file diff --git a/Package.swift b/Package.swift index d4dc66a..e828e61 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ let package = Package( dependencies: [ .package(url: "https://github.com/tuist/Path.git", .upToNextMajor(from: "0.3.2")), .package(url: "https://github.com/tuist/FileSystem.git", .upToNextMajor(from: "0.3.0")), - .package(url: "https://github.com/tuist/Command.git", .upToNextMajor(from: "0.6.3")) + .package(url: "https://github.com/tuist/Command.git", .upToNextMajor(from: "0.6.3")), ], targets: [ .target( diff --git a/Project.swift b/Project.swift index 3e8b136..9e72257 100644 --- a/Project.swift +++ b/Project.swift @@ -12,7 +12,7 @@ let project = Project( dependencies: [ .external(name: "Path"), .external(name: "FileSystem"), - .external(name: "Command") + .external(name: "Command"), ] ), .target( diff --git a/Sources/AppleBundleSizeAnalyzer/AppleBundleSizeAnalyzer.swift b/Sources/AppleBundleSizeAnalyzer/AppleBundleSizeAnalyzer.swift index e69de29..8b13789 100644 --- a/Sources/AppleBundleSizeAnalyzer/AppleBundleSizeAnalyzer.swift +++ b/Sources/AppleBundleSizeAnalyzer/AppleBundleSizeAnalyzer.swift @@ -0,0 +1 @@ + diff --git a/Tuist/Config.swift b/Tuist/Config.swift index 62646f9..fc25417 100644 --- a/Tuist/Config.swift +++ b/Tuist/Config.swift @@ -1,9 +1,9 @@ import ProjectDescription let config = Config( -// Create an account with "tuist auth" and a project with "tuist project create" + // Create an account with "tuist auth" and a project with "tuist project create" // then uncomment the section below and set the project full-handle. // * Read more: https://docs.tuist.io/guides/quick-start/gather-insights // - fullHandle: "tuist/apple-bundle-size-analyzer" + fullHandle: "tuist/apple-bundle-size-analyzer" )