Skip to content

Commit 713da86

Browse files
committed
add linter check to CI
1 parent bd2dbdc commit 713da86

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,15 @@ jobs:
312312
path: ${{ env.CCACHE_DIR }}
313313
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
314314
key: ${{ github.job }}-ccache-${{ github.run_id }}
315+
316+
lint:
317+
name: 'lint'
318+
runs-on: ubuntu-24.04
319+
steps:
320+
- uses: actions/checkout@v4
321+
with:
322+
fetch-depth: 0
323+
- name: Build lint Docker image
324+
run: DOCKER_BUILDKIT=1 docker build -t bitcoin-linter --file "./ci/lint_imagefile" ./
325+
- name: Run linter
326+
run: docker run --rm -v $(pwd):/bitcoin bitcoin-linter

ci/test/03_test_script.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,13 @@ fi
124124
# === CMake build (modern path used by the fork) ===
125125
if [ -n "$NO_DEPENDS" ]; then
126126
echo "Building with CMake (NO_DEPENDS=1)..."
127-
cmake -B build -S . ${CMAKE_GENERATOR:+-G "$CMAKE_GENERATOR"} "$BITCOIN_CONFIG_ALL"
127+
# shellcheck disable=SC2086
128+
cmake -B build -S . ${CMAKE_GENERATOR:+-G "$CMAKE_GENERATOR"} $BITCOIN_CONFIG_ALL
128129
else
129130
# depends path (still uses configure in some jobs)
130131
./autogen.sh
131-
./configure "$BITCOIN_CONFIG_ALL"
132+
# shellcheck disable=SC2086
133+
./configure $BITCOIN_CONFIG_ALL
132134
fi
133135

134136
cmake --build build --config Release --parallel "$MAKEJOBS"

test/functional/test_framework/blocktools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def script_BIP34_coinbase_height(height):
161161
return CScript([CScriptNum(height)])
162162

163163

164-
def create_coinbase(height, pubkey=None, *, script_pubkey=None, extra_output_script=None, fees=0, nValue=50):
164+
def create_coinbase(height, pubkey=None, *, script_pubkey=None, extra_output_script=None, fees=0, nValue=50, retarget_period=REGTEST_RETARGET_PERIOD): # noqa: unused - used by mining_mainnet.py currently disabled
165165
"""Create a coinbase transaction.
166166
167167
If pubkey is passed in, the coinbase output will be a P2PK output;

0 commit comments

Comments
 (0)