Skip to content

Commit

Permalink
apacheGH-39990: [Docs][CI] Add sphinx-lint for docs linting (apache#4…
Browse files Browse the repository at this point in the history
…0022)

### What changes are included in this PR?

This adds developer tooling to the repo for linting the docs by adding the sphinx-lint tool to archery and our pre-commit hooks. In both locations, only two rules are enabled at the moment (Discussed in apache#40006): `trailing-whitespace` and `missing-final-newline`.

This PR also fixes the individual issues covered by the new tooling. 

### Are these changes tested?

Yes, though manually. I tested this works by running `archery lint --docs` and `pre-commit` without and without changes that should get caught by the rules. It works as expected.

### Are there any user-facing changes?

Yes,

1. Developers that use pre-commit hooks will see a change in behavior when they modify docs
2. Developers using archery will see a new --docs option in `archery lint`
3. Developers working on the docs may see CI failures related to the new checks

* Closes: apache#39990
* GitHub Issue: apache#39990

Authored-by: Bryce Mecum <[email protected]>
Signed-off-by: Bryce Mecum <[email protected]>
  • Loading branch information
amoeba authored and tolleybot committed May 4, 2024
1 parent 1171234 commit ed3645d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/developers/java/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ Arrow repository, and update the following settings:
* To enable debugging JNI-based modules like ``dataset``,
activate specific profiles in the Maven tab under "Profiles".
Ensure the profiles ``arrow-c-data``, ``arrow-jni``, ``generate-libs-cdata-all-os``,
``generate-libs-jni-macos-linux``, and ``jdk11+`` are enabled, so that the
``generate-libs-jni-macos-linux``, and ``jdk11+`` are enabled, so that the
IDE can build them and enable debugging.

You may not need to update all of these settings if you build/test with the
Expand Down
2 changes: 1 addition & 1 deletion docs/source/developers/release_verification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ and test the result on their own platform in order to cast a +1 vote.
# this will create and automatically clean up a temporary directory for the verification environment and will run the source verification
TEST_DEFAULT=0 TEST_SOURCE=1 verify-release-candidate.sh $VERSION $RC_NUM
# to verify only certain implementations use the TEST_DEFAULT=0 and TEST_* variables
# here are a couple of examples, but see the source code for the available options
TEST_DEFAULT=0 TEST_CPP=1 verify-release-candidate.sh $VERSION $RC_NUM # only C++ tests
Expand Down

0 comments on commit ed3645d

Please sign in to comment.