Skip to content

Commit

Permalink
[oss-check] Fix rules path (#5303)
Browse files Browse the repository at this point in the history
So that oss-check can run only the rules that have changed
  • Loading branch information
marcelofabri authored Oct 27, 2023
1 parent cb3001b commit 2b53369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/oss-check
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def set_globals
@effective_main_commitish = `git merge-base origin/main #{@options[:branch]}`.chomp
@changed_swift_files = `git diff --diff-filter=AMRCU #{@effective_main_commitish} --name-only | grep "\.swift$" || true`.split("\n")
@changed_rule_files = @changed_swift_files.select do |file|
file.start_with? 'Source/SwiftLintFramework/Rules/'
file.start_with? 'Source/SwiftLintBuiltInRules/Rules/'
end
@rules_changed = @changed_rule_files.map do |path|
if File.read(path) =~ /^\s+identifier: "(\w+)",$/
Expand Down

0 comments on commit 2b53369

Please sign in to comment.