Skip to content

Commit 8096285

Browse files
authored
Merge pull request #2338 from jbampton/add-markdownlint
pre-commit: add `markdownlint` and clean Markdown files
2 parents 211abf3 + 2fc9027 commit 8096285

File tree

5 files changed

+49
-7
lines changed

5 files changed

+49
-7
lines changed

.github/linters/.markdown-lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# MD013/line-length Line length
19+
MD013: false
20+
21+
# MD014/commands-show-output Dollar signs used before commands without showing output
22+
MD014: false
23+
24+
# MD033/no-inline-html Inline HTML
25+
MD033: false
26+
27+
# MD034/no-bare-urls Bare URL used
28+
MD034: false
29+
30+
# MD040/fenced-code-language Fenced code blocks should have a language specified
31+
MD040: false
32+
33+
# MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading
34+
MD041: false

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ repos:
4747
args: [--allow-missing-credentials]
4848
- id: detect-private-key
4949
- id: forbid-submodules
50+
- repo: https://github.com/igorshubovych/markdownlint-cli
51+
rev: v0.45.0
52+
hooks:
53+
- id: markdownlint
54+
name: run markdownlint
55+
description: check Markdown files with markdownlint
56+
args: [--config=.github/linters/.markdown-lint.yml]
57+
exclude: ^\.github/.*$
58+
types: [markdown]
59+
files: \.md$
5060
- repo: https://github.com/adrienverge/yamllint
5161
rev: v1.37.1
5262
hooks:

CONTRIBUTING.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Contributing to Apache Shiro
33

44
Summary
55
-------
6+
67
This document covers how to contribute to the Apache Shiro project. These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the Apache Shiro project and you will submit a Pull Request for your changes to be added.
78

89
_Let's get started!!!_
910

10-
1111
Fork the code
1212
-------------
1313

@@ -29,7 +29,6 @@ $ git fetch upstream
2929
$ git rebase upstream/main
3030
```
3131

32-
3332
Making changes
3433
--------------
3534

@@ -50,7 +49,6 @@ $ git commit -a -m "descriptive commit message for your changes"
5049
> The `-b` specifies that you want to create a new branch called `feature_x`. You only specify `-b` the first time you checkout because you are creating a new branch.
5150
> Once the `feature_x` branch exists, you can later switch to it with only `git checkout feature_x`.
5251
53-
5452
Rebase `feature_x` to include updates from `upstream/main`
5553
------------------------------------------------------------
5654

@@ -74,7 +72,6 @@ $ git rebase main
7472

7573
> Now your `feature_x` branch is up-to-date with all the code in `upstream/main`.
7674
77-
7875
Make a GitHub Pull Request to contribute your changes
7976
-----------------------------------------------------
8077

@@ -100,7 +97,6 @@ To initiate the pull request, do the following:
10097
If you are requested to make modifications to your proposed changes, make the changes locally on your `feature_x` branch, re-push the `feature_x` branch to your fork.
10198
The existing pull request should automatically pick up the change and update accordingly.
10299

103-
104100
Cleaning up after a successful pull request
105101
-------------------------------------------
106102

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[<img src="https://shiro.apache.org/images/apache-shiro-logo.png" align="right" />](https://shiro.apache.org)
1+
[<img src="https://shiro.apache.org/images/apache-shiro-logo.png" align="right" alt="Apache Shiro" />](https://shiro.apache.org)
22

33
[![Maven Central](https://img.shields.io/maven-central/v/org.apache.shiro/shiro-core)](https://central.sonatype.com/artifact/org.apache.shiro/shiro-core/)
44
[![Build Status](https://ci-builds.apache.org/buildStatus/icon?job=Shiro%2FShiro-all%2Fmain)](https://ci-builds.apache.org/job/Shiro/job/Shiro-all/job/main/)
@@ -12,13 +12,16 @@ Apache Shiro
1212

1313
Documentation and Examples
1414
--------------------------
15+
1516
https://shiro.apache.org
1617

1718
Tutorials
1819
---------
20+
1921
* [10 Minute Tutorial](https://shiro.apache.org/10-minute-tutorial.html)
2022
* [Web Application](https://shiro.apache.org/webapp-tutorial.html)
2123

2224
License
2325
-------
26+
2427
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)

samples/spring-boot/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ Run the Example
99
```
1010
mvn spring-boot:run
1111
```
12-

0 commit comments

Comments
 (0)