generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Currently, the plugin performs linting like:
runBufCommand(
project,
owner,
workingDirectory,
listOf("lint", "--error-format=json"),
expectedExitCodes = setOf(0, BUF_EXIT_CODE_FILE_ANNOTATION),
)
using default Buf settings.
In case the project follows a different configuration - e.g. uses buf.yaml with except block:
version: v1
deps:
- buf.build/googleapis/googleapis
breaking:
ignore_unstable_packages: true
use:
- FILE
lint:
allow_comment_ignores: true
use:
- COMMENTS
- DEFAULT
- PACKAGE_NO_IMPORT_CYCLE
- UNARY_RPC
except:
- RPC_RESPONSE_STANDARD_NAME
- RPC_REQUEST_RESPONSE_UNIQUE
The plugin reports a warning with a suggestion to apply a fix, which contradicts the project's configuration.
A solution would be to provide a setting with path to buf.yaml to be used for lining.
E.g.
configFileContent = readFrom(project.bufSettings.state.bufConfigPath)
runBufCommand(
project,
owner,
workingDirectory,
listOf("lint", "--error-format=json", "--config="+configFileContent),
expectedExitCodes = setOf(0, BUF_EXIT_CODE_FILE_ANNOTATION),
)
kubijo
Metadata
Metadata
Assignees
Labels
No labels