Skip to content

Conversation

qwertyyb
Copy link

Checklist
  • npm install && npm run lint && npm test passes
  • commit message follows commit guidelines
Description of change

fix no commands in compile_commands.json file when using objc files(.m or .mm source files)

@@ -81,7 +81,7 @@ def resolve(filename):
commands = per_config_commands.setdefault(configuration_name, [])
for source in sources:
file = resolve(source)
isc = source.endswith(".c")
isc = source.endswith(".c") or source.endswith(".m")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
isc = source.endswith(".c") or source.endswith(".m")
isc = source.endswith((".c", ".m"))

https://docs.astral.sh/ruff/rules/multiple-starts-ends-with

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