Skip to content

Commit 547beb5

Browse files
authored
Merge pull request #2981 from Flameeyes/master
Set up basic integration with pre-commit.
2 parents 01e2945 + 79cd864 commit 547beb5

File tree

297 files changed

+1148
-1231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+1148
-1231
lines changed

.github/workflows/create_website_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
python-version: 3.8
1919
- name: Install deps
2020
run: |
21-
pip install requests sh click
21+
pip install requests sh click
2222
- name: Versions
2323
run: |
2424
gcc --version

.github/workflows/pre-commit.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2019 Anthony Sottile
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
name: pre-commit
6+
7+
on:
8+
pull_request:
9+
push:
10+
branches: [master]
11+
12+
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v1
17+
- uses: actions/setup-python@v1
18+
- name: set PY
19+
run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
20+
- uses: actions/cache@v1
21+
with:
22+
path: ~/.cache/pre-commit
23+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
24+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v2.3.0
8+
hooks:
9+
- id: check-yaml
10+
- id: end-of-file-fixer
11+
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'
12+
- id: trailing-whitespace
13+
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'

BUILDING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Building CircuitPython
33

4-
Welcome to CircuitPython!
4+
Welcome to CircuitPython!
55

66
This document is a quick-start guide only.
77

@@ -28,7 +28,7 @@ This project has a bunch of git submodules. You will need to update them regula
2828
As part of the build process, mpy-cross is needed to compile .py files into .mpy files.
2929
To compile (or recompile) mpy-cross:
3030

31-
make -C mpy-cross
31+
make -C mpy-cross
3232

3333
# Building
3434

@@ -68,7 +68,7 @@ A successful run will say something like
6868

6969
# Debugging
7070

71-
The easiest way to debug CircuitPython on hardware is with a JLink device, JLinkGDBServer, and an appropriate GDB.
71+
The easiest way to debug CircuitPython on hardware is with a JLink device, JLinkGDBServer, and an appropriate GDB.
7272
Instructions can be found at https://learn.adafruit.com/debugging-the-samd21-with-gdb
7373

7474
If using JLink, you'll need both the `JLinkGDBServer` and `arm-none-eabi-gdb` running.

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2014 Coraline Ada Ehmke
3+
SPDX-FileCopyrightText: 2019 Kattni Rembor for Adafruit Industries
4+
5+
SPDX-License-Identifier: CC-BY-4.0
6+
-->
17
# Adafruit Community Code of Conduct
28

39
## Our Pledge
@@ -43,7 +49,7 @@ Examples of unacceptable behavior by participants include:
4349

4450
The goal of the standards and moderation guidelines outlined here is to build
4551
and maintain a respectful community. We ask that you don’t just aim to be
46-
"technically unimpeachable", but rather try to be your best self.
52+
"technically unimpeachable", but rather try to be your best self.
4753

4854
We value many things beyond technical expertise, including collaboration and
4955
supporting others within our community. Providing a positive experience for
@@ -74,9 +80,9 @@ You may report in the following ways:
7480
In any situation, you may send an email to <[email protected]>.
7581

7682
On the Adafruit Discord, you may send an open message from any channel
77-
to all Community Moderators by tagging @community moderators. You may
78-
also send an open message from any channel, or a direct message to
79-
@kattni#1507, @tannewt#4653, @danh#1614, @cater#2442,
83+
to all Community Moderators by tagging @community moderators. You may
84+
also send an open message from any channel, or a direct message to
85+
@kattni#1507, @tannewt#4653, @danh#1614, @cater#2442,
8086
@sommersoft#0222, @Mr. Certainly#0472 or @Andon#8175.
8187

8288
Email and direct message reports will be kept confidential.

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ All commands will, by default, run with `-E` (forces a rebuild from scratch of d
3434

3535
# will turn OFF the force rebuild
3636
make html FORCE=
37-
37+
3838
# will turn OFF the verbosity
3939
make html VERBOSE=
40-
40+
4141
# will turn OFF the force rebuild and make it doubly verbose when running
4242
make html FORCE= VERBOSE="-v -v"
4343

0 commit comments

Comments
 (0)