File tree Expand file tree Collapse file tree 2 files changed +33
-4
lines changed
src/sp_repo_review/checks Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -128,13 +128,14 @@ class PC180(PreCommit):
128
128
"Uses a markdown formatter"
129
129
130
130
renamed = {
131
- "https://github.com/pre-commit/mirrors-prettier" : "https://github.com/rbubley/mirrors-prettier"
131
+ "https://github.com/pre-commit/mirrors-prettier" : "https://github.com/rbubley/mirrors-prettier" ,
132
+ "https://github.com/executablebooks/mdformat" : "https://github.com/hukkin/mdformat" ,
132
133
}
133
134
134
135
repos = {
135
136
"https://github.com/rbubley/mirrors-prettier" ,
136
- "https://github.com/executablebooks/mdformat" ,
137
137
"https://github.com/hukkin/mdformat" ,
138
+ "https://github.com/rvben/rumdl-pre-commit" ,
138
139
}
139
140
140
141
Original file line number Diff line number Diff line change @@ -130,10 +130,38 @@ def test_pc180():
130
130
assert compute_check ("PC180" , precommit = precommit ).result
131
131
132
132
133
- def test_pc180_alt_1 ():
133
+ def test_pc180_rename ():
134
134
precommit = yaml .safe_load ("""
135
135
repos:
136
- - repo: https://github.com/rbubley/mirrors-prettier
136
+ - repo: https://github.com/pre-commit/mirrors-prettier
137
+ """ )
138
+ res = compute_check ("PC180" , precommit = precommit )
139
+ assert not res .result
140
+ assert "https://github.com/rbubley/mirrors-prettier" in res .err_msg
141
+
142
+
143
+ def test_pc180_alt_2 ():
144
+ precommit = yaml .safe_load ("""
145
+ repos:
146
+ - repo: https://github.com/hukkin/mdformat
147
+ """ )
148
+ assert compute_check ("PC180" , precommit = precommit ).result
149
+
150
+
151
+ def test_pc180_rename_1 ():
152
+ precommit = yaml .safe_load ("""
153
+ repos:
154
+ - repo: https://github.com/executablebooks/mdformat
155
+ """ )
156
+ res = compute_check ("PC180" , precommit = precommit )
157
+ assert not res .result
158
+ assert "https://github.com/hukkin/mdformat" in res .err_msg
159
+
160
+
161
+ def test_pc180_alt_3 ():
162
+ precommit = yaml .safe_load ("""
163
+ repos:
164
+ - repo: https://github.com/rvben/rumdl-pre-commit
137
165
""" )
138
166
assert compute_check ("PC180" , precommit = precommit ).result
139
167
You can’t perform that action at this time.
0 commit comments