Skip to content

Conversation

@Ikos3k
Copy link

@Ikos3k Ikos3k commented Oct 28, 2025


detect:
filename: "(\\.c(c|pp|xx)$|\\.h(h|pp|xx)?$|\\.ii?$|\\.(def)$)"
filename: "(\\.c(c(m)?|pp(m)?|xx(m)?|\\+\\+m?)$|\\.h(\\+\\+|h|pp|xx)?$|\\.i(i)?$|\\.(def|ino|inl|ipp|ixx|tpp|txx)$|\\.h(pp)?\\.in$)"
Copy link
Contributor

@niten94 niten94 Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't read or write C++ code, so I think you should not change anything based on this comment only and maybe wait until someone else comments.

A part of this change is good, since it seems to add filename extensions for C++20 modules. There currently seems to be a lot: https://stackoverflow.com/questions/75733706/what-is-the-file-extension-naming-convention-for-c20-modules

There are the only changes I suggest, from left to right in the changed line:

  • \\.c(c(m)?|pp(m)?|xx(m)?|\\+\\+m?)$\\.c(c|pp|xx|\\+\\+)m?$
  • \\.i(i)?$\\.ii?$: Revert, since it should probably be understood as "basic" syntax of regex that this matches example.i
  • ino: Remove since this is likely for Arduino code, which has a different file in Micro: arduino.yaml

Maybe \.h(pp)?\\.in$ should be removed, since I'm not sure we should recognize .in now in cpp.yaml only. Instead, Micro should probably ignore this on all filetypes.

I believe .in can be files in any language, with text like @PREFIX@ which a project's build system replaces. Actual examples I've seen are configuration, scripts, and patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants