Skip to content

Commit

Permalink
Merge pull request #1 from simojo/master
Browse files Browse the repository at this point in the history
Allow for integration testing of chasten's ability to read from remote configuration files
  • Loading branch information
gkapfham authored Nov 14, 2023
2 parents e9d9bf4 + 637c190 commit 25a8020
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config_url_and_local_checks_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# chasten configuration
# used for testing purposes
chasten:
# point to a combination of checks files and local files
checks-file:
- https://raw.githubusercontent.com/AstuteSource/chasten-configuration/master/dummy_checks.yml
- checks.yml
- https://raw.githubusercontent.com/AstuteSource/chasten-configuration/master/dummy_checks.yml
- checks.yml
8 changes: 8 additions & 0 deletions config_url_checks_file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# chasten configuration
# used for testing purposes
# meant to be called as a url endpoint
# Example: https://raw.githubusercontent.com/AstuteSource/chasten/master/.chasten/url_config.yml
chasten:
# point to a checks file
checks-file:
- https://raw.githubusercontent.com/AstuteSource/chasten-configuration/master/dummy_checks.yml
36 changes: 36 additions & 0 deletions dummy_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
checks:
- name: "class-definition"
code: "CDF"
id: "C001"
pattern: './/ClassDef'
count:
min: 1
max: null
- name: "all-function-definition"
code: "AFD"
id: "F001"
pattern: './/FunctionDef'
count:
min: 1
max: null
- name: "dummy-test-non-test-function-definition"
code: "NTF"
id: "F002"
pattern: './/FunctionDef[not(contains(@name, "test_"))]'
count:
min: null
max: null
- name: "dummy-test-single-nested-if"
code: "SNI"
id: "CL001"
pattern: './/FunctionDef/body//If'
count:
min: null
max: null
- name: "dummy-test-double-nested-if"
code: "DNI"
id: "CL002"
pattern: './/FunctionDef/body//If[ancestor::If and not(parent::orelse)]'
count:
min: null
max: null

0 comments on commit 25a8020

Please sign in to comment.