github / github/codeql

[feat] comments that enable/disable LSP formatting

Open
#21,730 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

I don't see LSP (`codeql execute language-server`) having any documentation other than its help page, so I'm just assuming that this isn't a feature.

I like formatting my queries with the LSP formatter, but sometimes it formats stuff in a way that makes it clearly less readable to me. I want the equivalent of clang's

```codeql
// clang-format off

// clang-format on
```

https://clang.llvm.org/docs/ClangFormatStyleOptions.html#disabling-formatting-on-a-piece-of-code

Contributor guide

Open the contributing guide

Research direction

Start at the `codeql execute language-server` entry point and its help page, then compare the requested behavior with clang-format's documented disabling markers. Clarify the marker syntax, scope, and expected interaction with LSP formatting; done means formatting is disabled only for the requested regions and the behavior is documented and tested.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.