Skip to content

Commit eed58a0

Browse files
authored
Add .C for valid C++ extensions (#222)
test plan: see related semgrep PR - [x] I ran `make setup && make` to update the generated code after editing a `.atd` file (TODO: have a CI check) - [x] I made sure we're still backward compatible with old versions of the CLI. For example, the Semgrep backend need to still be able to *consume* data generated by Semgrep 1.17.0. See https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades
1 parent 4f9a3ea commit eed58a0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Language.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ let list = [
144144
id_string = "cpp";
145145
name = "C++";
146146
keys = [{|cpp|}; {|c++|}];
147-
exts = [{|.cc|}; {|.cpp|}; {|.cxx|}; {|.c++|}; {|.pcc|}; {|.tpp|}; {|.h|}; {|.hh|}; {|.hpp|}; {|.hxx|}; {|.inl|}; {|.ipp|}];
147+
exts = [{|.cc|}; {|.cpp|}; {|.cxx|}; {|.c++|}; {|.pcc|}; {|.tpp|}; {|.C|}; {|.h|}; {|.hh|}; {|.hpp|}; {|.hxx|}; {|.inl|}; {|.ipp|}];
148148
maturity = Alpha;
149149
example_ext = Some {|.cpp|};
150150
excluded_exts = [];

generate.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ def to_json(self):
248248
keys=["cpp", "c++"],
249249
# Extensions are taken directly from tokei's language JSON file:
250250
# https://github.com/XAMPPRocky/tokei/blob/master/languages.json
251-
exts=[".cc", ".cpp", ".cxx", ".c++", ".pcc", ".tpp", ".h", ".hh", ".hpp", ".hxx", ".inl", ".ipp"],
251+
# The .C was added for LSEG
252+
exts=[".cc", ".cpp", ".cxx", ".c++", ".pcc", ".tpp", ".C", ".h", ".hh", ".hpp", ".hxx", ".inl", ".ipp"],
252253
example_ext=".cpp",
253254
maturity=Maturity.ALPHA,
254255
shebangs=[]

lang.json

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
".c++",
111111
".pcc",
112112
".tpp",
113+
".C",
113114
".h",
114115
".hh",
115116
".hpp",

0 commit comments

Comments
 (0)