codeowner_validator 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- data/.github/ISSUE_TEMPLATE/config.yml +6 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +30 -0
- data/.github/pull_request_template.md +32 -0
- data/.github/workflows/cd.yml +53 -0
- data/.github/workflows/ci.yml +39 -0
- data/.gitignore +23 -0
- data/.rspec +4 -0
- data/.rubocop.yml +926 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.vscode/launch.json +53 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/CONTRIBUTING.md +40 -0
- data/CONTRIBUTORS.md +3 -0
- data/Gemfile +20 -0
- data/LICENSE +205 -0
- data/NOTICE +13 -0
- data/README.md +160 -0
- data/Rakefile +8 -0
- data/bin/bundle-audit +29 -0
- data/bin/bundler-audit +29 -0
- data/bin/codeowner_validator +8 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/codeowner_validator.gemspec +41 -0
- data/lib/codeowner_validator/cli/validator_cli.rb +64 -0
- data/lib/codeowner_validator/code_owners.rb +308 -0
- data/lib/codeowner_validator/common/command.rb +40 -0
- data/lib/codeowner_validator/common/logging.rb +86 -0
- data/lib/codeowner_validator/common/tasks/base.rb +62 -0
- data/lib/codeowner_validator/group/comment/error.rb +21 -0
- data/lib/codeowner_validator/group/comment/info.rb +21 -0
- data/lib/codeowner_validator/group/comment/verbose.rb +21 -0
- data/lib/codeowner_validator/group/comment/warn.rb +21 -0
- data/lib/codeowner_validator/group/comment.rb +55 -0
- data/lib/codeowner_validator/helpers/config_helper.rb +73 -0
- data/lib/codeowner_validator/helpers/utility_helper.rb +30 -0
- data/lib/codeowner_validator/lists/whitelist.rb +145 -0
- data/lib/codeowner_validator/tasks/duplicate_checker.rb +32 -0
- data/lib/codeowner_validator/tasks/file_exists_checker.rb +35 -0
- data/lib/codeowner_validator/tasks/missing_assignment_checker.rb +32 -0
- data/lib/codeowner_validator/tasks/syntax_checker.rb +32 -0
- data/lib/codeowner_validator/validator.rb +76 -0
- data/lib/codeowner_validator/version.rb +11 -0
- data/lib/codeowner_validator.rb +32 -0
- data/lib/codeowners/checker/group/line.rb +12 -0
- metadata +204 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9b7c6486b06a5d901e16a9832878588af1e3a053c2dc831a10ec391712019fba
|
4
|
+
data.tar.gz: b1d39da8af2673c74ba6d054588538c0c21b8b251333b8e65c83a1af970bc992
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eaf28f5df9af24d42f6b197fa75f3596f2549609917ed6b2cf8cfb6d70b9e4d3391b4a4c365723cd950e07cd5012db4308937ae2287d506d54318ca81fc91a99
|
7
|
+
data.tar.gz: e16eccee7010b4713cba8440d7e8d134ce9976d68a5a3437e1fa0e2531b3e6972696d9ce65877c0d4280e98288d495aec09221388bbe1abd3f2fed73c0aa32fb
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
name: "\U0001F41E Bug report"
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: bug
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
> Before reporting a bug
|
11
|
+
- [ ] Check the bug is reproducible.
|
12
|
+
- [ ] Search for [existing issues](https://github.com/cerner/codeowner_validator/issues).
|
13
|
+
|
14
|
+
**Describe the bug**
|
15
|
+
A clear and concise description of what the bug is.
|
16
|
+
|
17
|
+
**To Reproduce**
|
18
|
+
Steps to reproduce the behavior:
|
19
|
+
1. Execute command '...'
|
20
|
+
2. See error
|
21
|
+
|
22
|
+
**Expected behavior**
|
23
|
+
A clear and concise description of what you expected to happen.
|
24
|
+
|
25
|
+
**Screenshots**
|
26
|
+
If applicable, add screenshots to help explain your problem.
|
27
|
+
|
28
|
+
**Desktop (please complete the following information):**
|
29
|
+
- OS: [e.g. Mac, Windows]
|
30
|
+
|
31
|
+
**Additional context**
|
32
|
+
Add any other context about the problem here including a link to a repository demonstrating the reproducible issue.
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
name: "\U0001F680 New Feature Request"
|
3
|
+
about: Propose a new feature
|
4
|
+
title: ''
|
5
|
+
labels: feature
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**What problem are you trying to solve? Please describe.**
|
11
|
+
> Eg. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
|
14
|
+
**The ideal solution: What should the feature should do?**
|
15
|
+
> A clear and concise description of what you want to happen.
|
16
|
+
|
17
|
+
|
18
|
+
**If you have code or pseudo-code please provide:**
|
19
|
+
|
20
|
+
<!-- Put your code examples here -->
|
21
|
+
```ruby
|
22
|
+
|
23
|
+
```
|
24
|
+
|
25
|
+
- [ ] Willing to submit a pull request to implement this feature?
|
26
|
+
|
27
|
+
**Additional context**
|
28
|
+
Add any other context or screenshots about the feature request here.
|
29
|
+
|
30
|
+
Thank you for your contribution!
|
@@ -0,0 +1,32 @@
|
|
1
|
+
## Description of Changes
|
2
|
+
<!--Describe (in detail) the changes in the pull request here.-->
|
3
|
+
|
4
|
+
## Motivation and Context
|
5
|
+
<!--Why is this change required? What problem does it solve? What does this add?-->
|
6
|
+
|
7
|
+
## How Has This Been Tested?
|
8
|
+
<!--Describe in detail how these changes have been tested (include environment/devices).-->
|
9
|
+
|
10
|
+
## Type of change
|
11
|
+
<!--Put an 'x' in all of the boxes that apply.-->
|
12
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
13
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
14
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
15
|
+
- [ ] This change requires a documentation update
|
16
|
+
- [ ] Release activity
|
17
|
+
|
18
|
+
## Checklist:
|
19
|
+
<!--Put an 'x' in all of the boxes to assure following guidance.-->
|
20
|
+
Following the [Contributing Guidelines][3]
|
21
|
+
- [ ] My code follows the style guidelines of this project
|
22
|
+
- [ ] I have performed a self-review of my own code
|
23
|
+
- [ ] I have made corresponding changes to the documentation
|
24
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works and they pass when merging upstream
|
25
|
+
- [ ] I have added an entry to the [Changelog][2] accordingly
|
26
|
+
- [ ] I have added my name to the [CONTRIBUTORS.md][1]
|
27
|
+
- [ ] I have [squashed related commits][4]
|
28
|
+
|
29
|
+
[1]: ./CONTRIBUTORS.md
|
30
|
+
[2]: ./CHANGELOG.md
|
31
|
+
[3]: ./CONTRIBUTING.md
|
32
|
+
[4]: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
name: CD
|
3
|
+
|
4
|
+
on:
|
5
|
+
release:
|
6
|
+
types:
|
7
|
+
- published
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
tests:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
fail-fast: false
|
14
|
+
matrix:
|
15
|
+
ruby:
|
16
|
+
- 2.7
|
17
|
+
name: Ruby-${{matrix.ruby}}
|
18
|
+
steps:
|
19
|
+
- name: Check out
|
20
|
+
uses: actions/checkout@v2
|
21
|
+
- name: Setup ruby and bundle
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
bundler-cache: true
|
25
|
+
ruby-version: ${{ matrix.ruby }}
|
26
|
+
- name: Install dependencies
|
27
|
+
run: bundle install --jobs 4 --retry 3
|
28
|
+
- name: Run tests
|
29
|
+
run: bundle exec rspec
|
30
|
+
- name: Run Rubocop
|
31
|
+
run: bundle exec rubocop
|
32
|
+
release:
|
33
|
+
runs-on: ubuntu-latest
|
34
|
+
name: Release to RubyGems
|
35
|
+
steps:
|
36
|
+
- uses: actions/checkout@v2
|
37
|
+
- uses: ruby/setup-ruby@v1
|
38
|
+
with:
|
39
|
+
bundler-cache: true
|
40
|
+
ruby-version: ${{ matrix.ruby }}
|
41
|
+
- name: Install dependencies
|
42
|
+
run: bundle install --jobs 4 --retry 3
|
43
|
+
- name: Publish to RubyGems
|
44
|
+
run: |
|
45
|
+
mkdir -p $HOME/.gem
|
46
|
+
touch $HOME/.gem/credentials
|
47
|
+
chmod 0600 $HOME/.gem/credentials
|
48
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
49
|
+
gem build *.gemspec
|
50
|
+
gem push *.gem
|
51
|
+
env:
|
52
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
53
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
#CI will run on all pushes and PRs to verify validity of the code
|
3
|
+
name: CI
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: ['**']
|
8
|
+
pull_request:
|
9
|
+
branches: ['main']
|
10
|
+
schedule:
|
11
|
+
- cron: '0 1 * * SUN'
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
tests:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
strategy:
|
17
|
+
fail-fast: false
|
18
|
+
matrix:
|
19
|
+
ruby:
|
20
|
+
- 2.6
|
21
|
+
- 2.7
|
22
|
+
- 3.0
|
23
|
+
name: Ruby-${{matrix.ruby}}
|
24
|
+
continue-on-error: ${{matrix.ruby == 'head'}}
|
25
|
+
steps:
|
26
|
+
- name: Check out
|
27
|
+
uses: actions/checkout@v2
|
28
|
+
- name: Setup ruby and bundle
|
29
|
+
uses: ruby/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
bundler-cache: true
|
32
|
+
ruby-version: ${{ matrix.ruby }}
|
33
|
+
- name: Install dependencies
|
34
|
+
run: bundle install --jobs 4 --retry 3
|
35
|
+
- name: Run tests
|
36
|
+
run: bundle exec rspec
|
37
|
+
- name: Run Rubocop
|
38
|
+
run: bundle exec rubocop
|
39
|
+
|
data/.gitignore
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
.DS_Store
|
2
|
+
*.gem
|
3
|
+
*.rbc
|
4
|
+
Gemfile.lock
|
5
|
+
.config
|
6
|
+
.bundle
|
7
|
+
.yardoc
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
log/*.log
|
19
|
+
coverage/
|
20
|
+
.idea
|
21
|
+
spec/internal/log
|
22
|
+
target
|
23
|
+
build
|
data/.rspec
ADDED