Skip to content

Commit

Permalink
fix: various failures and issues (#185)
Browse files Browse the repository at this point in the history
* fix: Analyze Groovy files in folder

Fix Analyze Groovy files in folder which was always available resulting
in failures dependent on the context it was used.

It is now only available from a explorer folder.

Also correct the name of the parameter passed so explorer folder
requests work.

Fixes #177

* fix: partial fixes never applying

Fix fixes in files which still have remaining issues not applying due to
the change in behaviour of npm-groovy-lint status code handling in
11.0.0 by now requesting failon: none.

* chore: improve debugging

Add more debugging so that its easier to understand what is happening.

Default debugging setting to that the DEBUG environment if set so that
the developer doesn't have to set it manually in settings when running a
debug session.

Also enable npm-groovy-lint debugging which is key to understanding
issues. While this was previous set for debugging sessions in the
environment the setting would always override it.

* ci: fix linting and update modules

Fix all the CI linting errors and update modules to address
vulnerabilities.

* chore: update client and server dependencies

Update all client and server dependencies to eliminate security issues.

* fix: random test failures

Refactor tests to be more reliable, making them independent
of each other, so if one test fails others are not effected. This
includes self managing timeouts as mocha doesn't handle pending
promises, which makes it harder to debug issues.

Run and Debug commands:
* Fix path to workspace files of "Language Server E2E Test" Run
  and Debug command.
* Rename to make it clear what each config is used for.

Add mochaExplorer configuration, to improve test visibility.

Re-enable big groovy test file, now it works as expected.

Rename test files to eliminate stuttering.

Fix test debugging by using NPM_DEBUG instead of DEBUG env var
which is filtered out by vscode, see:
microsoft/vscode#197494.

Remove duplicate lint call that's now handled by onDidChangeContent.

Remove fixed delay comment so we don't have to update when the delay
changes.

Update Node and JVM versions in README.md.

Update all packages, to address security issues and bring in
the latest version of npm-groovy-lint which includes a critical
race condition fix.

Clean up imports.

Use onDidChangeContent to trigger re-linting to improve
performance and remove skipNextOnDidChangeContents which
conflicts with this change.

Eliminate else statements where previous block returns,
to improve code readability.

Refactor resetDiagnostics into deleteDiagnostics as its now
only used for the delete flow, so we can remove unnecessary
logic and diagnostic changes.

Remove commented out code.

Convert high noise debugging to trace.

Add missing await to docManager.updateDocumentSettings call

Use latest xvfb-action@v1 instead of v1.0 to bring in the latest
fixes.
  • Loading branch information
stevenh authored Dec 16, 2023
1 parent 9ffe56c commit da683f3
Show file tree
Hide file tree
Showing 41 changed files with 7,232 additions and 7,591 deletions.
52 changes: 33 additions & 19 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,8 @@
"language": "en",
"version": "0.2",
"words": [
"activedocument",
"Affero",
"Bizzarri",
"COPYPASTE",
"DEVSKIM",
"Davide",
"ECONNREFUSED",
"ETIMEOUT",
"Grovvy",
"Jenkinsfile",
"Microbundle",
"Misordered",
"Nashorn",
"Nuxt",
"OPENVSX",
"PROSELINT",
"Rulesets",
"Serv",
"Sublicensing",
"Vuillamy",
"WIPO",
"anymatch",
"applescript",
"archy",
Expand All @@ -36,20 +18,26 @@
"asynckit",
"atomtest",
"backticks",
"Bizzarri",
"callsites",
"camelcase",
"caseless",
"chardet",
"chownr",
"circleci",
"clientrc",
"cliui",
"codecoverage",
"codenarc",
"commondir",
"COPYPASTE",
"dashdash",
"Davide",
"decamelize",
"destructured",
"DEVSKIM",
"dotenv",
"ECONNREFUSED",
"editorconfig",
"embertest",
"eqeqeq",
Expand All @@ -61,9 +49,12 @@
"estraverse",
"estree",
"esutils",
"ETIMEOUT",
"extglob",
"extsprintf",
"failon",
"favicon",
"fixrules",
"flattendeep",
"fontawesome",
"fromentries",
Expand All @@ -77,19 +68,24 @@
"groovylint",
"groovylintlsp",
"groovylintrc",
"Grovvy",
"hasha",
"imurmurhash",
"isexe",
"isstream",
"javaexecutable",
"javaoptions",
"javascripts",
"jdeploy",
"jenkinsfile",
"Jenkinsfile",
"jsbn",
"jscoverage",
"jsesc",
"jsonify",
"jspm",
"jsprim",
"killserver",
"lannonbr",
"lcov",
"lerna",
Expand All @@ -99,17 +95,25 @@
"markdownlint",
"materialx",
"megalinter",
"Microbundle",
"minipass",
"minizlib",
"Misordered",
"mkdocs",
"multiline",
"nashorn",
"Nashorn",
"njre",
"nolintafter",
"nonblock",
"notif",
"npmignore",
"nuxt",
"Nuxt",
"nvuillam",
"OPENVSX",
"optionator",
"optns",
"ovsx",
"oxsecurity",
"paren",
Expand All @@ -122,20 +126,28 @@
"preload",
"processinfo",
"promisified",
"PROSELINT",
"prototypejs",
"pymdownx",
"querystringify",
"QUICKFIX",
"quickstart",
"qunit",
"readdirp",
"readonly",
"regexpp",
"returnrules",
"rulesets",
"Rulesets",
"rulesetsoverridetype",
"Serv",
"serviceworker",
"sourcefilepath",
"sprintf",
"sshpk",
"stefanzweifel",
"stylelint",
"Sublicensing",
"tootallnate",
"trimend",
"trimstart",
Expand All @@ -149,8 +161,10 @@
"updateable",
"vsix",
"vuepress",
"Vuillamy",
"webextensions",
"webidl",
"WIPO",
"wrappy",
"wscript",
"yallist",
Expand Down
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/class-name-casing": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/build-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@ on:
push:
branches:
- master

permissions: read-all

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.x
python-version: "3.x"
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "14"
- run: pip install mkdocs-material mdx_truly_sane_lists
- run: npm ci
- run: npm run compile
- run: mkdocs gh-deploy --force
- run: |
pip install mkdocs-material mdx_truly_sane_lists
npm ci
npm run compile
mkdocs gh-deploy --force
# This step will evaluate the repo status and report the change
- name: Check if there are changes
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/deploy-RELEASE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ on:
# Want to run the automation when a release is created
types: ["created"]

permissions: read-all

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- uses: lannonbr/vsce-action@master
- uses: lannonbr/vsce-action@08c559e5b8d51bf7c1e4ae83744a561b8c5870c8
with:
args: "publish -p $VSCE_TOKEN"
env:
Expand All @@ -28,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update check

on:
push:
tags:
- v*
branches:
- main
pull_request:

permissions:
contents: read

jobs:
go:
name: Check for changes
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies and link
run: |
npm ci
npm link
- name: Validate no changes
run: |
npm run dev:pre-commit
git --no-pager diff
[[ 0 -eq $(git status --porcelain | wc -l) ]]
10 changes: 10 additions & 0 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@ env: #Uncomment to activate variables below
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request (default), push, all)
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)

permissions: read-all

jobs:
build:
name: Mega-Linter
runs-on: ubuntu-latest

# Give the default GITHUB_TOKEN write permission to commit and push, comment
# issues, and post new Pull Requests; remove the ones you do not need
permissions:
contents: write
issues: write
pull-requests: write

steps:
# Git Checkout
- name: Checkout Code
Expand Down
47 changes: 21 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,37 @@ name: Test

on: [push, pull_request]

permissions: read-all

concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: false

jobs:
test_ubuntu:
name: Test Linux
runs-on: ubuntu-latest
test:
strategy:
matrix:
node_version: ['18']
os: [ubuntu-latest, macos-latest, windows-latest]
name: Test
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Checkout
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install node
uses: actions/setup-node@v3
with:
node-version: "14"
node-version: ${{ matrix.node_version }}
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Compile
run: npm run compile
- name: Run headless test
uses: GabrielBB/[email protected]
uses: GabrielBB/xvfb-action@v1
env:
NPM_DEBUG: vscode-groovy-lint
with:
run: npm run test
test_windows:
name: Test Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Compile
run: npm run compile
- name: Run tests
run: npm run test
Loading

0 comments on commit da683f3

Please sign in to comment.