Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: realm/SwiftLint
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.54.0
Choose a base ref
...
head repository: realm/SwiftLint
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.55.0
Choose a head ref

Commits on Nov 10, 2023

  1. Add new changelog section

    jpsim committed Nov 10, 2023
    Copy the full SHA
    bfe576e View commit details

Commits on Nov 11, 2023

  1. Copy the full SHA
    3a03e7a View commit details
  2. Copy the full SHA
    779f6f0 View commit details
  3. Copy the full SHA
    1603f4a View commit details
  4. Copy the full SHA
    7557ebd View commit details

Commits on Nov 12, 2023

  1. Copy the full SHA
    9b25efa View commit details

Commits on Nov 14, 2023

  1. Copy the full SHA
    fb4ef95 View commit details

Commits on Nov 15, 2023

  1. Copy the full SHA
    9fbc04e View commit details
  2. Copy the full SHA
    33e3593 View commit details

Commits on Nov 16, 2023

  1. Copy the full SHA
    9cd4740 View commit details
  2. Ignore MODULE.bazel.lock (#5358)

    This file is generated by default by bazel @ HEAD but we don't really
    want to manage it. This way it can be generated locally and folks can
    build offline if they have generated it at least once.
    keith authored Nov 16, 2023
    Copy the full SHA
    746c198 View commit details
  3. [bazel] Add optional universal macro support (#5357)

    This allows users to pass `--@SwiftLint//:universal_tools=true` in order
    to compile the underlying macros as a universal binary, which aids in
    caching across intel and arm macs
    keith authored Nov 16, 2023
    Copy the full SHA
    b1af9c4 View commit details

Commits on Nov 17, 2023

  1. Publish a multi-platform Docker image

    Addresses #4531
    jpsim committed Nov 17, 2023
    Copy the full SHA
    73c49d5 View commit details

Commits on Nov 19, 2023

  1. Copy the full SHA
    eab0af8 View commit details
  2. Harmonize violation positions (#5360)

    Marks the violating identifiers directly.
    SimplyDanny authored Nov 19, 2023
    Copy the full SHA
    09d1ef9 View commit details
  3. Copy the full SHA
    efddde6 View commit details
  4. Revert "Publish a multi-platform Docker image" (#5363)

    This reverts commit 73c49d5.
    jpsim authored Nov 19, 2023
    Copy the full SHA
    3511512 View commit details
  5. Copy the full SHA
    ff1e966 View commit details

Commits on Nov 29, 2023

  1. Copy the full SHA
    8cb2cf9 View commit details

Commits on Nov 30, 2023

  1. Copy the full SHA
    eecb44d View commit details
  2. Copy the full SHA
    b32c59b View commit details

Commits on Dec 2, 2023

  1. Copy the full SHA
    0d54c2a View commit details
  2. Copy the full SHA
    544e1c6 View commit details
  3. Copy the full SHA
    188ad69 View commit details

Commits on Dec 4, 2023

  1. Copy the full SHA
    e4e22b5 View commit details
  2. Silence pattern_matching_keywords rule when an identifier is refere…

    …nced in the argument list (#5375)
    SimplyDanny authored Dec 4, 2023
    Copy the full SHA
    f369caa View commit details

Commits on Dec 9, 2023

  1. Copy the full SHA
    7d6f6cf View commit details

Commits on Dec 10, 2023

  1. Add example (#5381)

    SimplyDanny authored Dec 10, 2023
    Copy the full SHA
    078d333 View commit details
  2. Copy the full SHA
    7c59300 View commit details
  3. Copy the full SHA
    06287d5 View commit details
  4. Copy the full SHA
    0b7a6f7 View commit details
  5. Copy the full SHA
    57ac398 View commit details
  6. Re-enable Swift in OSS checks

    Reverts 7a0cf40.
    SimplyDanny committed Dec 10, 2023
    Copy the full SHA
    fefc4ce View commit details

Commits on Dec 13, 2023

  1. Copy the full SHA
    6366fb8 View commit details

Commits on Dec 15, 2023

  1. Copy the full SHA
    68c9b86 View commit details
  2. Copy the full SHA
    3d29c67 View commit details

Commits on Dec 17, 2023

  1. Copy the full SHA
    9ed8020 View commit details

Commits on Dec 20, 2023

  1. Copy the full SHA
    ddaf3d2 View commit details

Commits on Dec 22, 2023

  1. Copy the full SHA
    77a9d3c View commit details

Commits on Dec 26, 2023

  1. Copy the full SHA
    a8a676f View commit details

Commits on Jan 3, 2024

  1. Add option to switch_case_alignment rule to ignore switch statement…

    …s written on a single line (#5390)
    tonell-m authored Jan 3, 2024
    Copy the full SHA
    902ac30 View commit details

Commits on Jan 4, 2024

  1. Copy the full SHA
    8040b9f View commit details

Commits on Jan 6, 2024

  1. Exit early (#5410)

    SimplyDanny authored Jan 6, 2024
    Copy the full SHA
    0d37f9d View commit details
  2. Copy the full SHA
    56ed87f View commit details

Commits on Jan 7, 2024

  1. Copy the full SHA
    8b98d85 View commit details
  2. Copy the full SHA
    31eb218 View commit details

Commits on Jan 9, 2024

  1. Copy the full SHA
    f4fa852 View commit details
  2. Copy the full SHA
    2f15f66 View commit details

Commits on Jan 15, 2024

  1. Copy the full SHA
    6af9419 View commit details

Commits on Jan 16, 2024

  1. Copy the full SHA
    1c605a5 View commit details
Showing 338 changed files with 9,612 additions and 3,824 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain
build --macos_minimum_os=13.5 --host_macos_minimum_os=13.5
build --disk_cache=~/.bazel_cache
build --experimental_remote_cache_compression
build --experimental_remote_build_event_upload=minimal
build --remote_build_event_upload=minimal
build --nolegacy_important_outputs
build --swiftcopt=-warnings-as-errors

2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.4.0
7.0.0
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ steps:
- label: "Danger"
commands:
- echo "--- Install Bundler"
- gem install bundler
- gem install bundler -v 2.4.22
- echo "--- Bundle Install"
- bundle install
- echo "+++ Run Danger"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -65,3 +65,4 @@ bundle/

# Bazel
bazel-*
/MODULE.bazel.lock
3 changes: 1 addition & 2 deletions .sourcery/GeneratedTests.stencil
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@testable import SwiftLintBuiltInRules
@_spi(TestHelper)
@testable import SwiftLintCore
import SwiftLintTestHelpers

@@ -8,7 +7,7 @@ import SwiftLintTestHelpers

{% for rule in types.structs %}
{% if rule.name|hasSuffix:"Rule" %}
class {{ rule.name }}GeneratedTests: SwiftLintTestCase {
final class {{ rule.name }}GeneratedTests: SwiftLintTestCase {
func testWithDefaultConfiguration() {
verifyRule({{ rule.name }}.description)
}
51 changes: 27 additions & 24 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Directory and file filters
included:
- Plugins
- Source
- Tests
excluded:
- Tests/SwiftLintFrameworkTests/Resources

# Enabled/disabled rules
analyzer_rules:
- unused_declaration
- unused_import
@@ -24,7 +27,6 @@ disabled_rules:
- force_unwrapping
- function_default_parameter_at_end
- implicit_return
- implicitly_unwrapped_optional
- indentation_width
- inert_defer
- missing_docs
@@ -35,54 +37,60 @@ disabled_rules:
- multiline_parameters
- multiline_parameters_brackets
- no_extension_access_modifier
- no_fallthrough_only
- no_grouping_extension
- no_magic_numbers
- one_declaration_per_file
- prefer_nimble
- prefer_self_in_static_references
- prefixed_toplevel_constant
- redundant_self_in_closure
- required_deinit
- self_binding
- sorted_enum_cases
- strict_fileprivate
- superfluous_else
- switch_case_on_newline
- todo
- trailing_closure
- type_contents_order
- unused_capture_list
- vertical_whitespace_between_cases

# Configurations
attributes:
always_on_line_above:
- "@ConfigurationElement"
- "@OptionGroup"
- "@RuleConfigurationDescriptionBuilder"
identifier_name:
excluded:
- id
large_tuple: 3
number_separator:
minimum_length: 5
balanced_xctest_lifecycle: &unit_test_configuration
test_parent_classes:
- SwiftLintTestCase
- XCTestCase
empty_xctest_method: *unit_test_configuration
file_name:
excluded:
- Exports.swift
- GeneratedTests.swift
- RuleConfigurationMacros.swift
- SwiftSyntax+SwiftLint.swift
- TestHelpers.swift

balanced_xctest_lifecycle: &unit_test_configuration
test_parent_classes:
- SwiftLintTestCase
- XCTestCase
empty_xctest_method: *unit_test_configuration
single_test_class: *unit_test_configuration

final_test_case: *unit_test_configuration
function_body_length: 60
identifier_name:
excluded:
- id
large_tuple: 3
number_separator:
minimum_length: 5
redundant_type_annotation:
consider_default_literal_types_redundant: true
single_test_class: *unit_test_configuration
type_body_length: 400
unneeded_override:
affect_initializers: true
unused_import:
always_keep_imports:
- SwiftSyntaxBuilder # we can't detect uses of string interpolation of swift syntax nodes
- SwiftLintFramework # now that this is a wrapper around other modules, don't treat as unused

# Custom rules
custom_rules:
rule_id:
included: Source/SwiftLintBuiltInRules/Rules/.+/\w+\.swift
@@ -104,8 +112,3 @@ custom_rules:
message: Rule Test Function mustn't end with `rule`
regex: func\s*test\w+(r|R)ule\(\)
severity: error

unused_import:
always_keep_imports:
- SwiftSyntaxBuilder # we can't detect uses of string interpolation of swift syntax nodes
- SwiftLintFramework # now that this is a wrapper around other modules, don't treat as unused
34 changes: 30 additions & 4 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@build_bazel_rules_apple//apple:apple.bzl", "apple_universal_binary")
load(
"@build_bazel_rules_swift//swift:swift.bzl",
"swift_binary",
"swift_compiler_plugin",
"swift_library",
"universal_swift_compiler_plugin",
)

config_setting(
name = "strict_concurrency_builtin_rules",
values = {"define": "strict_concurrency_builtin_rules=true"},
)

bool_flag(
name = "universal_tools",
build_setting_default = False,
)

config_setting(
name = "universal_tools_config",
flag_values = {
"@SwiftLint//:universal_tools": "true",
},
)

copts = [
"-enable-upcoming-feature",
"ExistentialAny",
@@ -36,23 +50,31 @@ swift_library(
)

swift_compiler_plugin(
name = "SwiftLintCoreMacros",
name = "SwiftLintCoreMacros.underlying",
srcs = glob(["Source/SwiftLintCoreMacros/*.swift"]),
copts = copts + strict_concurrency_copts,
module_name = "SwiftLintCoreMacros",
deps = [
"@SwiftSyntax//:SwiftCompilerPlugin_opt",
"@SwiftSyntax//:SwiftSyntaxMacros_opt",
],
)

universal_swift_compiler_plugin(
name = "SwiftLintCoreMacros",
plugin = "SwiftLintCoreMacros.underlying",
)

swift_library(
name = "SwiftLintCore",
package_name = "SwiftLint",
srcs = glob(["Source/SwiftLintCore/**/*.swift"]),
copts = copts, # TODO: strict_concurrency_copts
module_name = "SwiftLintCore",
plugins = [
":SwiftLintCoreMacros",
],
plugins = select({
":universal_tools_config": [":SwiftLintCoreMacros"],
"//conditions:default": [":SwiftLintCoreMacros.underlying"],
}),
visibility = ["//visibility:public"],
deps = [
"@SwiftSyntax//:SwiftIDEUtils_opt",
@@ -71,6 +93,7 @@ swift_library(

swift_library(
name = "SwiftLintBuiltInRules",
package_name = "SwiftLint",
srcs = glob(["Source/SwiftLintBuiltInRules/**/*.swift"]),
copts = copts + select({
":strict_concurrency_builtin_rules": strict_concurrency_copts,
@@ -85,6 +108,7 @@ swift_library(

swift_library(
name = "SwiftLintExtraRules",
package_name = "SwiftLint",
srcs = [
"Source/SwiftLintExtraRules/Exports.swift",
"@swiftlint_extra_rules//:extra_rules",
@@ -99,6 +123,7 @@ swift_library(

swift_library(
name = "SwiftLintFramework",
package_name = "SwiftLint",
srcs = glob(
["Source/SwiftLintFramework/**/*.swift"],
),
@@ -114,6 +139,7 @@ swift_library(

swift_library(
name = "swiftlint.library",
package_name = "SwiftLint",
srcs = glob(["Source/swiftlint/**/*.swift"]),
copts = copts, # TODO: strict_concurrency_copts
module_name = "swiftlint",
Loading