diff --git a/.arclint b/.arclint --- a/.arclint +++ b/.arclint @@ -247,7 +247,8 @@ "type": "lint-markdown", "include": [ "(\\.md$)" - ] + ], + "exclude": "(^contrib/gitian-builder/)" } } } diff --git a/arcanist/linter/MarkdownLinter.php b/arcanist/linter/MarkdownLinter.php --- a/arcanist/linter/MarkdownLinter.php +++ b/arcanist/linter/MarkdownLinter.php @@ -39,11 +39,12 @@ private function isValidLink($currentPath, $link) { /* - * File anchors are not tested and always considered valid. + * File anchors should only contain lowercase alphanum chars, underscores + * or hyphens. * TODO: check that anchors have a corresponding section. */ if ($link[0] === '#') { - return true; + return preg_match('/^#[a-z0-9_\-]+$/', $link); } /* @@ -75,7 +76,7 @@ $fileContent = Filesystem::readFile($path); /* Check for broken links (typos in URL of missing target file) */ - $pattern = '/\[[^\]]+\]\(([^)]+\.[^ "#)]+)#?[^)]*\)/'; + $pattern = '/\[[^\]]+\]\((#?[^ "#)]+)#?[^)]*\)/'; if (preg_match_all($pattern, $fileContent, $matches, PREG_OFFSET_CAPTURE)) { foreach ($matches[1] as $match) { list($link, $offset) = $match; diff --git a/contrib/README.md b/contrib/README.md --- a/contrib/README.md +++ b/contrib/README.md @@ -5,9 +5,6 @@ Specific tools for developers working on this repository. Contains the script `github-merge.py` for merging GitHub pull requests securely and signing them using GPG. -### [Verify-Commits](/contrib/verify-commits) ### -Tool to verify that every merge commit was signed by a developer using the above `github-merge.py` script. - ### [Linearize](/contrib/linearize) ### Construct a linear, no-fork, best version of the blockchain. @@ -28,8 +25,8 @@ ### [Gitian-descriptors](/contrib/gitian-descriptors) ### Notes on getting Gitian builds up and running using KVM. -### [Gitian-keys](/contrib/gitian-keys) -PGP keys used for signing Bitcoin Core [Gitian release](/doc/release-process.md) results. +### [Gitian-signing](/contrib/gitian-signing) +PGP keys used for signing Bitcoin ABC [Gitian release](/doc/release-process.md) results. ### [MacDeploy](/contrib/macdeploy) ### Scripts and notes for Mac builds. diff --git a/doc/developer-notes.md b/doc/developer-notes.md --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -46,9 +46,9 @@ Various coding styles have been used during the history of the codebase, and the result is not very consistent. However, we're now trying to converge to a single style, so please use it in new code. Old code will be converted -gradually and you are encouraged to use the provided -[clang-format-diff script](/contrib/devtools/README.md#clang-format-diffpy) -to clean up the patch automatically before submitting a pull request. +gradually and a handful of linters will help you to clean up your patches before +submitting them for review. These linters are run automatically when using +`arc diff` but can also be explicitly called with `arc lint`. - Basic rules specified in [src/.clang-format](/src/.clang-format). - Braces on new lines for namespaces, classes, functions, methods. diff --git a/src/qt/README.md b/src/qt/README.md --- a/src/qt/README.md +++ b/src/qt/README.md @@ -16,7 +16,7 @@ ### forms -Contains [Designer UI](http://doc.qt.io/qt-5.9/designer-using-a-ui-file.html) files. They are created with [Qt Creator](#use-qt-Creator-as IDE), but can be edited using any text editor. +Contains [Designer UI](http://doc.qt.io/qt-5.9/designer-using-a-ui-file.html) files. They are created with [Qt Creator](#using-qt-creator-as-ide), but can be edited using any text editor. ### locale