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

new settings option to show problems panel after initial pass #183

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
# Trigger mega-linter at every push. Action will also be visible from Pull Requests to master
push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions)
pull_request:
branches: [master]
branches: [main]

env: #Uncomment to activate variables below
# Apply linter fixes configuration
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Fix doc deployment
- Add stale workflow
- Added new setting `showProblemsView` that controls if Problems View should open after initial lint pass

## [3.0.0] 2023-12-17

Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
## Features

| Command | Description | Access |
|----------------------------------------|--------------------------------------------------------------------------------------------------|----------------------------------------------------------|
| -------------------------------------- | ------------------------------------------------------------------------------------------------ | -------------------------------------------------------- |
| **Analyze code** | Lint the code of the current file | Ctrl+Shift+F9<br/>Contextual</br>Status bar<br/>Commands |
| **Format** | Format the code of the current file | Shift+Alt+F<br/>Contextual</br>Commands |
| **Fix all auto-fixable problems** | Fix the code of the current file | Contextual</br>Commands |
Expand All @@ -40,20 +40,21 @@

## Extension Settings

| Parameter | Description | Default |
|------------------------------|-----------------------------------------------------------------------------------------------------------------|----------------------|
| `groovyLint.enable` | Controls whether GroovyLint is enabled or not | true |
| `groovyLint.lint.trigger` | Run the linter on save (onSave), on type (onType) , or on user request | onSave |
| `groovyLint.format.enable` | Controls whether the groovy formatter is enabled or not | true |
| `groovyLint.fix.enable` | Run the auto-fixer on save (onSave), on type (onType) , or on user request | true |
| `groovyLint.fix.trigger` | Run the fixer on save (onSave), or on user request | user |
| `groovyLint.basic.loglevel` | Linting error level (error, warning,info) | info |
| `groovyLint.basic.verbose` | Turn on to have verbose logs | false |
| `groovyLint.basic.config` | [NPM groovy lint configuration file](https://github.com/nvuillam/npm-groovy-lint#configuration) | .groovylintrc.json |
| `groovyLint.debug.enable` | Display more logs in VsCode Output panel (select "GroovyLint") for issue investigation | false |
| `groovyLint.java.executable` | Override java executable to use <br/>Example: C:\\Program Files\\Java\\jdk1.8.0_144\\bin\\java.exe | java |
| `groovyLint.java.options` | Override java options to use | "-Xms256m,-Xmx2048m" |
| `groovyLint.insight.enable` | Allow to send anonymous usage statistics used only to improve the tool (we will of course never send your code) | false |
| Parameter | Description | Default |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------- |
| `groovyLint.enable` | Controls whether GroovyLint is enabled or not | true |
| `groovyLint.lint.trigger` | Run the linter on save (onSave), on type (onType) , or on user request | onSave |
| `groovyLint.format.enable` | Controls whether the groovy formatter is enabled or not | true |
| `groovyLint.fix.enable` | Run the auto-fixer on save (onSave), on type (onType) , or on user request | true |
| `groovyLint.fix.trigger` | Run the fixer on save (onSave), or on user request | user |
| `groovyLint.basic.loglevel` | Linting error level (error, warning,info) | info |
| `groovyLint.basic.verbose` | Turn on to have verbose logs | false |
| `groovyLint.basic.config` | [NPM groovy lint configuration file](https://github.com/nvuillam/npm-groovy-lint#configuration) | .groovylintrc.json |
| `groovyLint.debug.enable` | Display more logs in VsCode Output panel (select "GroovyLint") for issue investigation | false |
| `groovyLint.java.executable` | Override java executable to use <br/>Example: C:\\Program Files\\Java\\jdk1.8.0_144\\bin\\java.exe | java |
| `groovyLint.java.options` | Override java options to use | "-Xms256m,-Xmx2048m" |
| `groovyLint.insight.enable` | Allow to send anonymous usage statistics used only to improve the tool (we will of course never send your code) | false |
| `groovyLint.showProblemsView` | Show Problems View once after start | false |

## Troubleshooting

Expand Down
5 changes: 3 additions & 2 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ async function updateStatus(status: StatusParams): Promise<any> {
else if (status.state.startsWith('lint.end')) {
// Update status list
statusList = statusList.filter(statusObj => statusObj.id !== status.id);
// Show markers panel just once (after the user can choose to close it)
if (outputChannelShowedOnce === false) {

// Show Problems panel just once (if user didn't choose otherwise)
if (outputChannelShowedOnce === false && vscode.workspace.getConfiguration('groovyLint').get('showProblemsView', true) === true) {
vscode.commands.executeCommand('workbench.panel.markers.view.focus');
outputChannelShowedOnce = true;
}
Expand Down
31 changes: 16 additions & 15 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
## Features

| Command | Description | Access |
|----------------------------------------|--------------------------------------------------------------------------------------------------|----------------------------------------------------------|
| -------------------------------------- | ------------------------------------------------------------------------------------------------ | -------------------------------------------------------- |
| **Analyze code** | Lint the code of the current file | Ctrl+Shift+F9<br/>Contextual</br>Status bar<br/>Commands |
| **Format** | Format the code of the current file | Shift+Alt+F<br/>Contextual</br>Commands |
| **Fix all auto-fixable problems** | Fix the code of the current file | Contextual</br>Commands |
Expand All @@ -40,20 +40,21 @@

## Extension Settings

| Parameter | Description | Default |
|------------------------------|-----------------------------------------------------------------------------------------------------------------|----------------------|
| `groovyLint.enable` | Controls whether GroovyLint is enabled or not | true |
| `groovyLint.lint.trigger` | Run the linter on save (onSave), on type (onType) , or on user request | onSave |
| `groovyLint.format.enable` | Controls whether the groovy formatter is enabled or not | true |
| `groovyLint.fix.enable` | Run the auto-fixer on save (onSave), on type (onType) , or on user request | true |
| `groovyLint.fix.trigger` | Run the fixer on save (onSave), or on user request | user |
| `groovyLint.basic.loglevel` | Linting error level (error, warning,info) | info |
| `groovyLint.basic.verbose` | Turn on to have verbose logs | false |
| `groovyLint.basic.config` | [NPM groovy lint configuration file](https://github.com/nvuillam/npm-groovy-lint#configuration) | .groovylintrc.json |
| `groovyLint.debug.enable` | Display more logs in VsCode Output panel (select "GroovyLint") for issue investigation | false |
| `groovyLint.java.executable` | Override java executable to use <br/>Example: C:\\Program Files\\Java\\jdk1.8.0_144\\bin\\java.exe | java |
| `groovyLint.java.options` | Override java options to use | "-Xms256m,-Xmx2048m" |
| `groovyLint.insight.enable` | Allow to send anonymous usage statistics used only to improve the tool (we will of course never send your code) | false |
| Parameter | Description | Default |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------- |
| `groovyLint.enable` | Controls whether GroovyLint is enabled or not | true |
| `groovyLint.lint.trigger` | Run the linter on save (onSave), on type (onType) , or on user request | onSave |
| `groovyLint.format.enable` | Controls whether the groovy formatter is enabled or not | true |
| `groovyLint.fix.enable` | Run the auto-fixer on save (onSave), on type (onType) , or on user request | true |
| `groovyLint.fix.trigger` | Run the fixer on save (onSave), or on user request | user |
| `groovyLint.basic.loglevel` | Linting error level (error, warning,info) | info |
| `groovyLint.basic.verbose` | Turn on to have verbose logs | false |
| `groovyLint.basic.config` | [NPM groovy lint configuration file](https://github.com/nvuillam/npm-groovy-lint#configuration) | .groovylintrc.json |
| `groovyLint.debug.enable` | Display more logs in VsCode Output panel (select "GroovyLint") for issue investigation | false |
| `groovyLint.java.executable` | Override java executable to use <br/>Example: C:\\Program Files\\Java\\jdk1.8.0_144\\bin\\java.exe | java |
| `groovyLint.java.options` | Override java options to use | "-Xms256m,-Xmx2048m" |
| `groovyLint.insight.enable` | Allow to send anonymous usage statistics used only to improve the tool (we will of course never send your code) | false |
| `groovyLint.showProblemsView` | Show Problems View once after start | false |

## Troubleshooting

Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@
"default": true,
"description": "Controls whether GroovyLint is enabled or not."
},
"groovyLint.showProblemsView": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Show Problems View once after start."
},
"groovyLint.lint.trigger": {
"scope": "resource",
"type": "string",
Expand Down
Loading