Surfaced by SonarQube (api.spikersoft.com), rule csharpsquid:S2696, severity CRITICAL (MAINTAINABILITY). Updating static state from an instance method is a thread-safety / shared-state hazard.
Surfaced by SonarQube (`api.spikersoft.com`), rule `csharpsquid:S2696`, severity CRITICAL (MAINTAINABILITY). Updating `static` state from an instance method is a thread-safety / shared-state hazard.
## Locations
- `SpikerSoft.Business/Services/PostalCodeSeederService.cs:35`
- `SpikerSoft.Business/Services/PostalCodeSeederService.cs:36`
- `SpikerSoft.Business.Ai.Workers/Services/BookAnalysisService.cs:511`
## Fix
Make the field instance-scoped, or make the method `static`, or guard the shared write appropriately.
_Rule: https://rules.sonarsource.com/csharp/RSPEC-2696/_
Resolved in spikersoft-backend PR #12 (merged to master). Static-state writes in PostalCodeSeederService and BookAnalysisService now go through static helper methods, so instance methods no longer mutate static fields directly. Closing.
Resolved in spikersoft-backend PR #12 (merged to `master`). Static-state writes in `PostalCodeSeederService` and `BookAnalysisService` now go through static helper methods, so instance methods no longer mutate static fields directly. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Surfaced by SonarQube (
api.spikersoft.com), rulecsharpsquid:S2696, severity CRITICAL (MAINTAINABILITY). Updatingstaticstate from an instance method is a thread-safety / shared-state hazard.Locations
SpikerSoft.Business/Services/PostalCodeSeederService.cs:35SpikerSoft.Business/Services/PostalCodeSeederService.cs:36SpikerSoft.Business.Ai.Workers/Services/BookAnalysisService.cs:511Fix
Make the field instance-scoped, or make the method
static, or guard the shared write appropriately.Rule: https://rules.sonarsource.com/csharp/RSPEC-2696/
Resolved in spikersoft-backend PR #12 (merged to
master). Static-state writes inPostalCodeSeederServiceandBookAnalysisServicenow go through static helper methods, so instance methods no longer mutate static fields directly. Closing.