Commit 529d7f2
fix: ensure Dockerfile analysis works in IntelliJ 2026.1 with bundled TextMate Docker grammar (#249)
* fix: improve Dockerfile parser to handle real-world Dockerfile syntax
The parser was failing on common Dockerfile constructs:
- Missing instructions: MAINTAINER, HEALTHCHECK, SHELL, STOPSIGNAL, ONBUILD
- Line continuations with trailing whitespace after backslash
- Comments inside multi-line instructions breaking continuation
- ARG values containing paths (e.g., ARG HOME=/app)
- Heredoc syntax (<<EOF...EOF) causing parse errors
- Single-digit image tags (e.g., FROM rust:1) misidentified by lexer
Add unknownLine catch-all rule so unrecognized content is silently
skipped instead of causing parse errors. Reorder lexer rules so
ANY_CHAR (single-char catch-all) doesn't shadow VERSION, IDENTIFIER,
and IMAGE_NAME_TOKEN on same-length matches.
Tested against 85+ real-world Dockerfiles across multiple frameworks.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: ensure Dockerfile analysis works in IntelliJ 2026.1 with bundled TextMate Docker grammar
IntelliJ 2026.1 bundles a TextMate Docker grammar that claims Dockerfile
files with TextMateFileType, which implements PlainTextLikeFileType.
This marker interface causes IntelliJ's DaemonCodeAnalyzer to skip
ExternalAnnotator execution, preventing vulnerability analysis.
Add FileTypeOverrider to force Dockerfiles to use our rhda-dockerfile
file type and parser, ensuring the annotator and inspection fire correctly.
Also add isDockerfile() utility for filename-based detection supporting
Dockerfile, Containerfile, and their variants.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* build: upgrade trustify-da-java-client to 0.0.14
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent dea21cb commit 529d7f2
28 files changed
Lines changed: 866 additions & 197 deletions
File tree
- gradle
- src
- main
- gen/org/jboss/tools/intellij/image/build
- lexer
- parser
- psi
- impl
- java/org/jboss/tools/intellij/image
- build
- filetype
- resources/META-INF
- test
- java/org/jboss/tools/intellij/image
- resources/dockerfiles
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
Lines changed: 251 additions & 177 deletions
Large diffs are not rendered by default.
Lines changed: 29 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
| 259 | + | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments