Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: lint

on:
workflow_dispatch: # Manual trigger from GitHub UI
push:
branches: ['**']
paths:
- '**.swift'
- '.swiftlint.yml'
- '.github/workflows/lint.yml'
pull_request:
branches: [main]
paths:
- '**.swift'
- '.swiftlint.yml'
- '.github/workflows/lint.yml'

jobs:
swiftlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: SwiftLint
uses: norio-nomura/[email protected]
with:
args: --reporter github-actions-logging --lenient
7 changes: 4 additions & 3 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: build_test

on:
workflow_dispatch: # Manual trigger from GitHub UI
push:
branches: [ main ]
branches: ['**']
pull_request:
branches: [ main ]

Expand Down Expand Up @@ -40,8 +41,8 @@ jobs:
tar xzf swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz
mv swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04 /opt/swift
rm swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz
export PATH="/opt/swift/usr/bin:${PATH}"
- uses: actions/checkout@v2
echo "/opt/swift/usr/bin" >> $GITHUB_PATH
- uses: actions/checkout@v4
- name: Build
run: swift build -c ${{ matrix.kind }} -v
- name: Install protobuf
Expand Down
50 changes: 50 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# SwiftLint Configuration for Fuzzilli
# https://github.com/realm/SwiftLint

excluded:
- .build
- .venv
- v8
- v8_patch
- Targets
- Package.swift
- "**/*.pb.swift"
- "**/*Test*"

disabled_rules:
- trailing_whitespace
- line_length
- file_length
- type_body_length
- function_body_length
- cyclomatic_complexity
- identifier_name
- large_tuple
- nesting
- force_cast
- force_try
- force_unwrapping
- todo
- opening_brace
- trailing_comma

opt_in_rules:
- empty_count
- empty_string
- fatal_error_message
- first_where
- overridden_super_call
- redundant_nil_coalescing
- sorted_first_last
- yoda_condition
- contains_over_first_not_nil

function_parameter_count:
warning: 8
error: 10

type_name:
min_length: 2
max_length: 50

reporter: "github-actions-logging"
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ let package = Package(
"Protobuf/README.md",
"Protobuf/gen_programproto.py"],
resources: [
// The ast.proto file is required by the node.js parser
// The ast.proto file is required by the node.js parser and stuff
.copy("Protobuf/ast.proto"),
.copy("Compiler/Parser")]),

Expand Down
Loading