diff --git a/.flake8 b/.flake8
new file mode 100644
index 00000000..c7b743c5
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,10 @@
+[flake8]
+
+ignore =
+ # These are needed to make our license headers pass the linting
+ E265,
+ E266,
+
+# 10% larger than the standard 80 character limit. Conforms to the black
+# standard and Bugbear's B950.
+max-line-length = 88
diff --git a/.github/workflows/build-esp.yml b/.github/workflows/build-esp.yml
index 0def652e..b6efe03f 100644
--- a/.github/workflows/build-esp.yml
+++ b/.github/workflows/build-esp.yml
@@ -7,7 +7,7 @@ on:
branches: ["main"]
schedule:
# Build on Mondays at 9am PST every week
- - cron: '0 17 * * 1'
+ - cron: '0 17 * * 1'
jobs:
build-esp:
diff --git a/.github/workflows/build-nuttx.yml b/.github/workflows/build-nuttx.yml
index 952fc7ec..f9104e52 100644
--- a/.github/workflows/build-nuttx.yml
+++ b/.github/workflows/build-nuttx.yml
@@ -7,7 +7,7 @@ on:
branches: ["main"]
schedule:
# Build on Mondays at 9am PST every week
- - cron: '0 17 * * 1'
+ - cron: '0 17 * * 1'
jobs:
build-nuttx:
diff --git a/.github/workflows/build-pico-sdk.yml b/.github/workflows/build-pico-sdk.yml
index 06283bd6..67b76008 100644
--- a/.github/workflows/build-pico-sdk.yml
+++ b/.github/workflows/build-pico-sdk.yml
@@ -7,7 +7,7 @@ on:
branches: ["main"]
schedule:
# Build on Mondays at 9am PST every week
- - cron: '0 17 * * 1'
+ - cron: '0 17 * * 1'
jobs:
build-pico-sdk:
diff --git a/.github/workflows/build-zephyr.yml b/.github/workflows/build-zephyr.yml
index 0233f150..51b507ed 100644
--- a/.github/workflows/build-zephyr.yml
+++ b/.github/workflows/build-zephyr.yml
@@ -7,7 +7,7 @@ on:
branches: ["main"]
schedule:
# Build on Mondays at 9am PST every week
- - cron: '0 17 * * 1'
+ - cron: '0 17 * * 1'
jobs:
build-zephyr:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 52009c0a..33b86f83 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -7,22 +7,26 @@ on:
branches: ["main"]
jobs:
- lint:
- name: Lint
+ validate_format_config:
+ name: Validate Format Config
runs-on: ubuntu-latest
- container: swift:6.0-jammy
-
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install apt dependencies
- run: apt-get -qq update && apt-get -qq -y install curl
+ run: sudo apt-get -qq update && sudo apt-get -qq -y install curl
- name: Compare against swift-mmio swift-format config
run: |
curl -sL https://raw.githubusercontent.com/apple/swift-mmio/refs/heads/main/.swift-format -o .swift-format-mmio
diff .swift-format .swift-format-mmio
- - name: Lint
- run: swift-format lint --recursive --strict .
+ soundness:
+ name: Soundness
+ uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
+ with:
+ api_breakage_check_enabled: false # this repo doesn't vend any API
+ license_header_check_enabled: false # feature: https://github.com/swiftlang/github-workflows/issues/78
+ license_header_check_project_name: "Swift.org" # bug: https://github.com/swiftlang/github-workflows/issues/76
+ unacceptable_language_check_enabled: false # unfortunately many hardware specs use terms like master/slave in their documentation
diff --git a/Tools/macho2bin.py b/Tools/macho2bin.py
index 9b348f38..6ba74b3c 100755
--- a/Tools/macho2bin.py
+++ b/Tools/macho2bin.py
@@ -8,36 +8,45 @@
# See https://swift.org/LICENSE.txt for license information
#
-# macho2bin -- Converts a statically-linked executable Mach-O into a flat "BIN" file suitable for flashing as a single
-# contiguous blob onto some embedded devices. Note that this format assumes the embedded device can boot from a state
-# where the entire firmware (all segments) are flashed contigously into one smalle address range. This is true for e.g.
-# the STM32F746 devices if we place the vector table at 0x00200000, and code and data right after it, as the vector
-# table also contains a pointer to the initial PC. This setup might not work for other devices.
+# macho2bin -- Converts a statically-linked executable Mach-O into a flat "BIN" file
+# suitable for flashing as a single contiguous blob onto some embedded devices. Note
+# that this format assumes the embedded device can boot from a state where the entire
+# firmware (all segments) are flashed contigously into one smalle address range. This
+# is true for e.g. the STM32F746 devices if we place the vector table at 0x00200000,
+# and code and data right after it, as the vector table also contains a pointer to the
+# initial PC. This setup might not work for other devices.
#
# Usage:
-# $ macho2bin.py