Skip to content
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

Lint Remover #214

Merged
merged 15 commits into from
Jan 1, 2025
Merged
73 changes: 28 additions & 45 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,34 @@
"@cspell/dict-powershell/cspell-ext.json",
"@cspell/dict-csharp/cspell-ext.json"
],

"version": "0.2",
"language": "en",

"words": [
"RSAT",
"Artefacts",
"NTDS",
"Hildreth"
],

"ignoreWords": [
"malconfiguration",
"sarif",
"psscriptanalyzer",
"DEVSKIM",
"KICS",
"pscustomobject",
"certutil",
"certsvc",
"setreg",
"contoso",
"SCHANNEL",
"RSATAD",
"Dism",
"getreg",
"Dacl",
"Calver"
],

"flagWords": [
],

"patterns": [
{
"name": "ALL-CAPS-WORDS",
"pattern": "/\b[A-Z0-9]+\b/g",
"description": "Any word in ALL CAPS."
}
],

"ignoreRegExpList": [
"ALL-CAPS-WORDS",
"Email",
"github.com/",
"@"
]
"words": ["Artefacts", "Hildreth", "NTDS", "remediations", "RSAT"],
"ignoreWords": [
"malconfiguration",
"sarif",
"psscriptanalyzer",
"DEVSKIM",
"KICS",
"pscustomobject",
"certutil",
"certsvc",
"setreg",
"contoso",
"SCHANNEL",
"RSATAD",
"Dism",
"getreg",
"Dacl",
"Calver"
],
"flagWords": [],
"patterns": [
{
"name": "ALL-CAPS-WORDS",
"pattern": "/\b[A-Z0-9]+\b/g",
"description": "Any word in ALL CAPS."
}
],
"ignoreRegExpList": ["ALL-CAPS-WORDS", "Email", "github.com/", "@"]
}
5 changes: 4 additions & 1 deletion .github/workflows/Create External Help.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Create external help ZIP and CAB files for PowerShell.
# Requires Windows to use the makecab command.
---
name: 📚 Create External Help

on:
pull_request:
#push:
# push:
workflow_dispatch:

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/Deploy MkDocs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Deploy MkDocs and push to GitHub Pages
---
name: 📖 Deploy MkDocs to GitHub
# Install, build, and deploy MkDocs to GitHub Pages using content from the Docs folder.

Expand Down
149 changes: 76 additions & 73 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,94 @@
# MegaLinter GitHub Action configuration file
# More info at https://megalinter.io
---
name: MegaLinter
name: MegaLinter

# Trigger mega-linter at every pull request.
on:
pull_request:
# branches:
# - main
# - testing
# - dev
# - experimental
# Trigger mega-linter at every pull request.
on:
pull_request:
# branches:
# - main
# - testing
# push:
# branches:
# - main
# - testing
# workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
pull-requests: read
jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
pull-requests: read

steps:
steps:

# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}

# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performance
# fetch-depth: 0
# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performance
# fetch-depth: 0

# MegaLinter
- name: MegaLinter
# MegaLinter
- name: MegaLinter

# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.io/flavors/
# The dotnet flavor includes PowerShell, MD, YAML, JSON, spelling, and more.
uses: oxsecurity/megalinter/flavors/dotnet@v8.3.0
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.io/flavors/
# The dotnet flavor includes PowerShell, MD, YAML, JSON, spelling, and more.
uses: oxsecurity/megalinter/flavors/dotnet@v8.3.0

id: ml
id: ml

# All available variables are described in documentation
# https://megalinter.io/configuration/
env:
# All available variables are described in documentation
# https://megalinter.io/configuration/
env:

# Validates all source when push on main, else just the git diff with
# main. Override with true if you always want to lint all sources
#
# To validate the entire codebase, set to:
VALIDATE_ALL_CODEBASE: true
#
# To validate only diff with main, set to:
# VALIDATE_ALL_CODEBASE: >-
# ${{
# github.event_name == 'push' &&
# contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
# }}
# VALIDATE_ALL_CODEBASE: >-
# ${{
# github.event_name == 'push' &&
# contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
# }}
# Validates all source when push on main, else just the git diff with
# main. Override with true if you always want to lint all sources
#
# To validate the entire codebase, set to:
VALIDATE_ALL_CODEBASE: true
#
# To validate only diff with main, set to:
# VALIDATE_ALL_CODEBASE: >-
# ${{
# github.event_name == 'push' &&
# contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
# }}
# VALIDATE_ALL_CODEBASE: >-
# ${{
# github.event_name == 'push' &&
# contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
# }}

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE
# .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE
# .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY

# Uncomment to disable copy-paste and spell checks
# DISABLE: COPYPASTE,SPELL
DISABLE_ERRORS: true
DISABLE_LINTERS: EDITORCONFIG_EDITORCONFIG_CHECKER, SPELL_LYCHEE
# Uncomment DISABLE_ERRORS_LINTERS if you want to turn errors back on selectively.
# DISABLE_ERRORS_LINTERS: REPOSITORY_DEVSKIM,REPOSITORY_KICS,REPOSITORY_CHECKOV,POWERSHELL_POWERSHELL,SPELL_CSPELL
# Uncomment to disable copy-paste and spell checks
# DISABLE: COPYPASTE,SPELL
DISABLE_ERRORS: true
DISABLE_LINTERS: EDITORCONFIG_EDITORCONFIG_CHECKER, SPELL_LYCHEE
# Uncomment DISABLE_ERRORS_LINTERS if you want to turn errors back on selectively.
# DISABLE_ERRORS_LINTERS: REPOSITORY_DEVSKIM,REPOSITORY_KICS,REPOSITORY_CHECKOV,POWERSHELL_POWERSHELL,SPELL_CSPELL

# Upload MegaLinter artifacts
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
# Upload MegaLinter artifacts
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
4 changes: 2 additions & 2 deletions .github/workflows/powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# https://github.com/microsoft/action-psscriptanalyzer
# For more information on PSScriptAnalyzer in general, see
# https://github.com/PowerShell/PSScriptAnalyzer

---
name: PSScriptAnalyzer

on:
push:
branches: [ "testing" ]
branches: ["testing", "main"]
pull_request:
schedule:
- cron: '41 14 * * 4'
Expand Down
13 changes: 13 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Mega-Linter Configuration File
# This must be separate from the GitHub workflow configuration file.
---
linters:
POWERSHELL_POWERSHELL:
DISABLE_RULES:
- Write-Host

# Enable/disable linters
DISABLE_LINTERS:
- COPYPASTE_JSCPD
- SPELL_CSPELL
- EDITORCONFIG_EDITORCONFIG_CHECKER
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

---
# Required
version: 2

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ representative at an online or offline event.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at coc@dotdot.horse.
reported to the community leaders responsible for enforcement at <coc@dotdot.horse>.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
Loading
Loading