G-Research / G-Research/fsharp-analyzers
Interpolated string in log functions
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 23
- Forks
- 3
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 6
Description
Related to https://g-research.github.io/fsharp-analyzers/analyzers/LoggingArgFuncNotFullyAppliedAnalyzer.html
Would it be interesting to also have an analyzer that detects a log call with a single interpolated string?
Instead of using the log message template.
let p = 42
// ❌
logger.Log(LogLevel.Information, $"foo %i{p}")
// ✅
logger.Log(LogLevel.Information, "foo {p}", p)
Would do you think @Smaug123?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the related LoggingArgFuncNotFullyAppliedAnalyzer documentation and the interpolated-string and log-template examples in the issue. Determine the intended analyzer behavior and supported cases before implementation; done means the proposed misuse is detected and the template form remains accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100