From 5993935f1265e0ab8a9a880b6f16cb36e2f61fb8 Mon Sep 17 00:00:00 2001 From: Gyan Ranjan Panda Date: Sat, 21 Feb 2026 01:28:27 +0530 Subject: [PATCH] Rename 'Grammar' optional step group to 'Antlr' in deploy_to_develop pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #2057 The decorator was used for three pipeline steps that handle ANTLR-specific grammar files (.g/.g4). The name "Grammar" is too generic and ambiguous — it does not make clear which grammar tool or technology is involved. Rename the optional step group from "Grammar" to "Antlr" to: - Align with all other optional step groups in the pipeline that are named after their specific technology (Java, Scala, Kotlin, Groovy, AspectJ, Clojure, etc.) - Make the user-facing CLI --groups flag, REST API, and UI unambiguous - Clearly communicate that these steps are exclusively for ANTLR grammar files The three affected steps are: - find_grammar_packages: finds java packages in .g/.g4 source files - map_grammar_to_class: maps .class files to their .g/.g4 source - map_jar_to_grammar_source: maps .jar files to their ANTLR source directory Note: Internal class names (GrammarLanguage, grammar_package, grammar_to_class) are database-persisted identifiers and are intentionally NOT changed to avoid requiring a data migration. Backward compatibility note: Existing pipeline configs or API calls using "--groups Grammar" must be updated to "--groups Antlr" after this change. Signed-off-by: Gyan Ranjan Panda --- scanpipe/pipelines/deploy_to_develop.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scanpipe/pipelines/deploy_to_develop.py b/scanpipe/pipelines/deploy_to_develop.py index fa481fa95f..e8b915bfdb 100644 --- a/scanpipe/pipelines/deploy_to_develop.py +++ b/scanpipe/pipelines/deploy_to_develop.py @@ -250,21 +250,21 @@ def map_jar_to_kotlin_source(self): project=self.project, jvm_lang=jvm.KotlinLanguage, logger=self.log ) - @optional_step("Grammar") + @optional_step("Antlr") def find_grammar_packages(self): """Find the java package of the .g/.g4 source files.""" d2d.find_jvm_packages( project=self.project, jvm_lang=jvm.GrammarLanguage, logger=self.log ) - @optional_step("Grammar") + @optional_step("Antlr") def map_grammar_to_class(self): """Map a .class compiled file to its .g/.g4 source.""" d2d.map_jvm_to_class( project=self.project, jvm_lang=jvm.GrammarLanguage, logger=self.log ) - @optional_step("Grammar") + @optional_step("Antlr") def map_jar_to_grammar_source(self): """Map .jar files to their related source directory.""" d2d.map_jar_to_jvm_source(