Skip to content

Conversation

@filipw
Copy link
Contributor

@filipw filipw commented Jan 19, 2026

I noticed that the Q# best practice is to NOT use namespace blocks to enclose code, and I thought this might be a good candidate for adding a new lint.

This PR introduces such lint, at the Allow level by default to not be invasive. If the syntax is deprecated at some point, it could be reused and updated to a warn.

Once configured to warn this is how it looks like:

image

I did not want to highlight the whole namespace as it was visually too aggressive so I opted for the name only.

I hope this makes sense and adds some value. It was easy to do with minimal changes only.
We did something similar years ago in Omnisharp 🙂

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.

1 participant