Skip to content

Commit 868cec0

Browse files
wmdietlaosen-xiong
andauthored
Fix spotlessCheck failing with a built manual (eisop#1660)
Co-authored-by: Aosen Xiong <aosenxiong@gmail.com>
1 parent fcf9683 commit 868cec0

3 files changed

Lines changed: 17 additions & 16 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ASCIIDOC_FILES:=$(shell find . -name "*.adoc")
1313
asciidoc-style-check:
1414
asciidoctor -o /dev/null ${ASCIIDOC_FILES}
1515

16-
PYTHON_FILES:=$(shell find . \( -name .do-like-javac -o -name .git-scripts \) -prune -o -name "*.py" -print)
16+
PYTHON_FILES:=$(shell find . \( -name .do-like-javac -o -name .git-scripts -o -name .plume-scripts \) -prune -o -name "*.py" -print)
1717
install-ruff:
1818
@if ! command -v ruff ; then pipx install ruff ; fi
1919
python-style-fix: install-ruff

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ allprojects { currentProj ->
278278
'dataflow': ['manual/examples/**'],
279279
'docs': [
280280
'examples/BazelExample/bazel-BazelExample/**',
281-
'examples/lombok/build/**'
281+
'examples/lombok/build/**',
282+
'manual/plume-bib/.plume-scripts/**',
282283
],
283284
'framework': [
284285
'tests/build/**',

checker/bin-devel/test-misc.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,6 @@ PLUME_SCRIPTS="$SCRIPT_DIR/.plume-scripts"
2121

2222
status=0
2323

24-
## Code style and formatting
25-
JAVA_VER=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1 | sed 's/-ea//' | sed 's/-beta//')
26-
if [ "${JAVA_VER}" != "8" ] && [ "${JAVA_VER}" != "11" ]; then
27-
./gradlew spotlessCheck --console=plain --warning-mode=all
28-
fi
29-
if grep -n -r --exclude-dir=build --exclude-dir=examples --exclude-dir=jtreg --exclude-dir=tests --exclude="*.astub" --exclude="*.tex" '^\(import static \|import .*\*;$\)'; then
30-
echo "Don't use static import or wildcard import"
31-
exit 1
32-
fi
33-
make style-check --jobs="$(getconf _NPROCESSORS_ONLN)"
34-
35-
## HTML legality
36-
./gradlew htmlValidate --console=plain --warning-mode=all
37-
3824
## Javadoc documentation
3925
# Try twice in case of network lossage.
4026
(./gradlew javadoc --console=plain --warning-mode=all || (sleep 60 && ./gradlew javadoc --console=plain --warning-mode=all)) || status=1
@@ -70,3 +56,17 @@ git diff --exit-code docs/manual/contributors.tex \
7056

7157
# Check gradle tasks are configured properly
7258
./gradlew tasks
59+
60+
## Code style and formatting
61+
JAVA_VER=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1 | sed 's/-ea//' | sed 's/-beta//')
62+
if [ "${JAVA_VER}" != "8" ] && [ "${JAVA_VER}" != "11" ]; then
63+
./gradlew spotlessCheck --console=plain --warning-mode=all
64+
fi
65+
if grep -n -r --exclude-dir=build --exclude-dir=examples --exclude-dir=jtreg --exclude-dir=tests --exclude="*.astub" --exclude="*.tex" '^\(import static \|import .*\*;$\)'; then
66+
echo "Don't use static import or wildcard import"
67+
exit 1
68+
fi
69+
make style-check --jobs="$(getconf _NPROCESSORS_ONLN)"
70+
71+
## HTML legality
72+
./gradlew htmlValidate --console=plain --warning-mode=all

0 commit comments

Comments
 (0)