-
Notifications
You must be signed in to change notification settings - Fork 14
Add linting and link testing #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e232180
initial commit
jfaurskov 77732fa
Add to check psscriptanalyzer functionality
jfaurskov c0c45e3
test
jfaurskov fddb382
fix vars
jfaurskov d25bb5d
fix script
jfaurskov def9c5c
fix
jfaurskov b10372b
whitepace
jfaurskov 33f5bc0
whitespace
jfaurskov 4d65649
psscriptanalyzer
jfaurskov b754a71
Commit
jfaurskov 936c776
get-report
jfaurskov 18bbe9b
update
jfaurskov 4bcfbe0
Add settings file
jfaurskov 06a224b
singular use
jfaurskov e5e3b1f
modify file config ps path
jfaurskov 76c5e29
Update .github/workflows/code-review.yml
jfaurskov d49bbd3
Update .github/linters/.markdown-lint.yml
jfaurskov 840ddd7
Update .github/linters/.yaml-lint.yml
jfaurskov 4827b32
Update .github/workflows/code-review.yml
jfaurskov 8f906ad
Update .github/workflows/code-review.yml
jfaurskov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| dirs: | ||
| - ./ | ||
| #baseUrl: https://example.com | ||
| # ignorePatterns: | ||
| # - pattern: '^https://example.com/skip/.*$' | ||
| # - pattern: "^(ftp)://[^\\s/$?#]*\\.[^\\s]*$" | ||
| # replacementPatterns: | ||
| # - pattern: "(https?://example.com)/(\\w+)/(\\d+)" | ||
| # replacement: '$1/id/$3' | ||
| # - pattern: "\\[([^\\]]+)\\]\\((https?://example.com)/file\\)" | ||
| # replacement: '<a href="$2/file">$1</a>' | ||
| aliveStatusCodes: | ||
| - 200 | ||
| - 201 | ||
| - 204 | ||
| useGitIgnore: true | ||
| modifiedFilesOnly: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| ########################### | ||
| ########################### | ||
| ## Markdown Linter rules ## | ||
| ########################### | ||
| ########################### | ||
|
|
||
| # Linter rules doc: | ||
| # - https://github.com/DavidAnson/markdownlint | ||
| # | ||
| # Note: | ||
| # To comment out a single error: | ||
| # <!-- markdownlint-disable --> | ||
| # any violations you want | ||
| # <!-- markdownlint-restore --> | ||
| # | ||
|
|
||
| ############### | ||
| # Rules by id # | ||
| ############### | ||
| MD004: false # Unordered list style | ||
| MD007: | ||
| indent: 2 # Unordered list indentation | ||
| MD013: | ||
| line_length: 900 # Line length 80 is far too short | ||
| MD026: | ||
| punctuation: ".,;:!。,;:" # List of not allowed | ||
| MD029: false # Ordered list item prefix | ||
| MD033: false # Allow inline HTML | ||
| MD036: false # Emphasis used instead of a heading | ||
|
|
||
| ################# | ||
| # Rules by tags # | ||
| ################# | ||
| blank_lines: false # Disable rules related to blank lines |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| rules: | ||
| line-length: | ||
| max: 900 | ||
| allow-non-breakable-words: true | ||
| allow-non-breakable-inline-mappings: false | ||
| truthy: disable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| @{ | ||
|
|
||
| # Disable specific rules by name | ||
| ExcludeRules = @( | ||
| 'PSUseShouldProcessForStateChangingFunctions' | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| name: Code Review - Linting & Link Checks | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: {} | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint code base | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Run github/super-linter | ||
| uses: super-linter/super-linter@v7.3.0 | ||
| env: | ||
| # Lint all code - disabled in as part of #262 | ||
| VALIDATE_ALL_CODEBASE: false | ||
| # Need to define main branch as default is set to master in super-linter | ||
| DEFAULT_BRANCH: main | ||
| # Enable setting the status of each individual linter run in the Checks section of a pull request | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| # The following linter types will be enabled: | ||
| VALIDATE_JSON: true | ||
| VALIDATE_MARKDOWN: true | ||
| VALIDATE_POWERSHELL: true | ||
| VALIDATE_YAML: true | ||
| POWERSHELL_CONFIG_FILE: PSScriptAnalyzerSettings.psd1 | ||
| #VALIDATE_EDITORCONFIG: true | ||
| # Disable errors to only generate a report | ||
| #DISABLE_ERRORS: true | ||
|
|
||
| markdown-link-check: | ||
| name: Markdown Link Check | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Run linkspector | ||
| uses: umbrelladocs/action-linkspector@v1.3.4 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| reporter: github-pr-review | ||
| fail_on_error: true | ||
| config_file: ".github/actions-config/.linkspector.yml" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.