Conversation
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: SomeOtherMethod
- Code Duplication SynonymsServiceWithDirective.cs
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Positive Code Health Impact (highest to lowest):
- Large Method SynonymsServiceWithDirective.cs: Add
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add 🔥
- Code Duplication SynonymsServiceWithDirective.cs 🔥
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add 🔥
ℹ️ Added Directives
- [2 new code health directives] View detailed results in CodeScene
| public bool SomeOtherMethod(string word, List<string> synonyms) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| //Remove all empty strings, or synonyms that are equal to word, and get Distinct values | ||
| synonyms.RemoveAll(s => string.IsNullOrWhiteSpace(s) || s == word); | ||
| synonyms = synonyms.Distinct().ToList(); | ||
|
|
||
| if (word == null || synonyms.Count == 0) return false; | ||
|
|
||
| //If the word that is a synonym already exists, get the ID. If not, add it | ||
| var synonymsFromCache = _words.Where(x => synonyms.Contains(x.WordString.ToLower())).ToList(); | ||
| var synonymIds = synonymsFromCache.Select(x => x.Id).ToList(); | ||
|
|
||
| //Get synonyms that are not already in cache | ||
| var synonymsNotInCache = synonyms.Where(s => !synonymsFromCache.Select(x => x.WordString).Contains(s)); | ||
|
|
||
| //Add those synonyms | ||
| var (newSynonymIds, nextId) = AddWordsToCache(_words.Count + 1, synonymIds, synonymsNotInCache); | ||
|
|
||
| //Now we have a list of all synonyms, new and old | ||
| var allSynonymIds = synonymIds.Concat(newSynonymIds).ToList(); | ||
|
|
||
| //Check if word already exists | ||
| var existingWord = _words.FirstOrDefault(x => x.WordString == word.ToLower()); | ||
|
|
||
| //If it doesn't, add the word and synonyms | ||
| if (existingWord == null) | ||
| { | ||
| //Add synonyms of synonyms | ||
| synonymsFromCache.ForEach(x => allSynonymIds.AddRange(x.SynonymIds)); | ||
|
|
||
| //Add new word and bind synonyms | ||
| _words.Add(new Word() { Id = nextId, WordString = word.ToLower(), SynonymIds = allSynonymIds.ToList() }); | ||
| allSynonymIds.Add(nextId); | ||
| } | ||
| else | ||
| { | ||
| //If it does, hook only synonyms that aren't already in the list | ||
| HookTheNewSynonymsToWord(existingWord, newSynonymIds); | ||
|
|
||
| //Add the word and its synonyms to all synonyms list | ||
| allSynonymIds.Add(existingWord.Id); | ||
| allSynonymIds.AddRange(existingWord.SynonymIds); | ||
| } | ||
| allSynonymIds = allSynonymIds.ToList(); | ||
|
|
||
| //Update newly added synonyms to have the references to all words | ||
| UpdateAllSynonymsOfSynonyms(allSynonymIds); | ||
|
|
||
| //Update the cache | ||
| _cache.Set(wordListCacheKey, _words); | ||
| return true; | ||
|
|
||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: Add,SomeOtherMethod
Why does this problem occur?
Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health. Read more.
To ignore this warning click here.
| return synonyms; | ||
| } | ||
|
|
||
| // @CodeScene(disable:"Complex Method") |
There was a problem hiding this comment.
❌ New issue: Complex Method
Add has a cyclomatic complexity of 29, threshold = 9
Why does this problem occur?
This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring. Read more.
To ignore this warning click here.
| return synonyms; | ||
| } | ||
|
|
||
| // @CodeScene(disable:"Complex Method") |
There was a problem hiding this comment.
✅ No longer an issue: Large Method
Add is no longer above the threshold for lines of code
Why does this problem occur?
Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function. Read more.
| public bool SomeOtherMethod(string word, List<string> synonyms) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| //Remove all empty strings, or synonyms that are equal to word, and get Distinct values | ||
| synonyms.RemoveAll(s => string.IsNullOrWhiteSpace(s) || s == word); | ||
| synonyms = synonyms.Distinct().ToList(); | ||
|
|
||
| if (word == null || synonyms.Count == 0) return false; | ||
|
|
||
| //If the word that is a synonym already exists, get the ID. If not, add it | ||
| var synonymsFromCache = _words.Where(x => synonyms.Contains(x.WordString.ToLower())).ToList(); | ||
| var synonymIds = synonymsFromCache.Select(x => x.Id).ToList(); | ||
|
|
||
| //Get synonyms that are not already in cache | ||
| var synonymsNotInCache = synonyms.Where(s => !synonymsFromCache.Select(x => x.WordString).Contains(s)); | ||
|
|
||
| //Add those synonyms | ||
| var (newSynonymIds, nextId) = AddWordsToCache(_words.Count + 1, synonymIds, synonymsNotInCache); | ||
|
|
||
| //Now we have a list of all synonyms, new and old | ||
| var allSynonymIds = synonymIds.Concat(newSynonymIds).ToList(); | ||
|
|
||
| //Check if word already exists | ||
| var existingWord = _words.FirstOrDefault(x => x.WordString == word.ToLower()); | ||
|
|
||
| //If it doesn't, add the word and synonyms | ||
| if (existingWord == null) | ||
| { | ||
| //Add synonyms of synonyms | ||
| synonymsFromCache.ForEach(x => allSynonymIds.AddRange(x.SynonymIds)); | ||
|
|
||
| //Add new word and bind synonyms | ||
| _words.Add(new Word() { Id = nextId, WordString = word.ToLower(), SynonymIds = allSynonymIds.ToList() }); | ||
| allSynonymIds.Add(nextId); | ||
| } | ||
| else | ||
| { | ||
| //If it does, hook only synonyms that aren't already in the list | ||
| HookTheNewSynonymsToWord(existingWord, newSynonymIds); | ||
|
|
||
| //Add the word and its synonyms to all synonyms list | ||
| allSynonymIds.Add(existingWord.Id); | ||
| allSynonymIds.AddRange(existingWord.SynonymIds); | ||
| } | ||
| allSynonymIds = allSynonymIds.ToList(); | ||
|
|
||
| //Update newly added synonyms to have the references to all words | ||
| UpdateAllSynonymsOfSynonyms(allSynonymIds); | ||
|
|
||
| //Update the cache | ||
| _cache.Set(wordListCacheKey, _words); | ||
| return true; | ||
|
|
||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
ℹ New issue: Large Method
SomeOtherMethod has 104 lines, threshold = 70
Why does this problem occur?
Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function. Read more.
To ignore this warning click here.
| return synonyms; | ||
| } | ||
|
|
||
| // @CodeScene(disable:"Complex Method") |
There was a problem hiding this comment.
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 5.30 to 7.45, threshold = 4
Why does this problem occur?
This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals. Read more.
To ignore this warning click here.
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- SomeOtherMethod: Complex Method
-
CSTesting/SynonymsAPI/Services/ServiceWithDirective.cs
-
Add: Duplicated Function Blocks; Complex Conditional; Duplicated Assertion Blocks; Large Method; Constructor Over-Injection; Brain Method; Excess Number of Function Arguments; Bumpy Road Ahead; Complex Method; Large Assertion Blocks; Deep, Nested Complexity; High Degree of Code Duplication
-
SomeOtherMethod: Complex Method
-
ℹ️ Removed Directives
-
CSTesting/SynonymsAPI/Services/SynonymsServiceWithDirective.cs
- Add: Complex Method
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add 🔥
- Code Duplication SynonymsServiceWithDirective.cs 🔥
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add 🔥
ℹ️ Added Directives
- [2 new code health directives] View detailed results in CodeScene
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
- [2 new code health directives] View detailed results in CodeScene
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add 🔥
- Code Duplication SynonymsServiceWithDirective.cs 🔥
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add 🔥
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
- [2 new code health directives] View detailed results in CodeScene
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add 🔥
- Code Duplication SynonymsServiceWithDirective.cs 🔥
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add 🔥
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
There was a problem hiding this comment.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Complex Method SynonymsServiceWithDirective.cs: Add
- Code Duplication SynonymsServiceWithDirective.cs
- Large Method ServiceWithDirective.cs: SomeOtherMethod
✅ Improving Code Health:
- Large Method SynonymsServiceWithDirective.cs: Add
ℹ️ Added Directives
| public bool SomeOtherMethod(string word, List<string> synonyms) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| //Remove all empty strings, or synonyms that are equal to word, and get Distinct values | ||
| synonyms.RemoveAll(s => string.IsNullOrWhiteSpace(s) || s == word); | ||
| synonyms = synonyms.Distinct().ToList(); | ||
|
|
||
| if (word == null || synonyms.Count == 0) return false; | ||
|
|
||
| //If the word that is a synonym already exists, get the ID. If not, add it | ||
| var synonymsFromCache = _words.Where(x => synonyms.Contains(x.WordString.ToLower())).ToList(); | ||
| var synonymIds = synonymsFromCache.Select(x => x.Id).ToList(); | ||
|
|
||
| //Get synonyms that are not already in cache | ||
| var synonymsNotInCache = synonyms.Where(s => !synonymsFromCache.Select(x => x.WordString).Contains(s)); | ||
|
|
||
| //Add those synonyms | ||
| var (newSynonymIds, nextId) = AddWordsToCache(_words.Count + 1, synonymIds, synonymsNotInCache); | ||
|
|
||
| //Now we have a list of all synonyms, new and old | ||
| var allSynonymIds = synonymIds.Concat(newSynonymIds).ToList(); | ||
|
|
||
| //Check if word already exists | ||
| var existingWord = _words.FirstOrDefault(x => x.WordString == word.ToLower()); | ||
|
|
||
| //If it doesn't, add the word and synonyms | ||
| if (existingWord == null) | ||
| { | ||
| //Add synonyms of synonyms | ||
| synonymsFromCache.ForEach(x => allSynonymIds.AddRange(x.SynonymIds)); | ||
|
|
||
| //Add new word and bind synonyms | ||
| _words.Add(new Word() { Id = nextId, WordString = word.ToLower(), SynonymIds = allSynonymIds.ToList() }); | ||
| allSynonymIds.Add(nextId); | ||
| } | ||
| else | ||
| { | ||
| //If it does, hook only synonyms that aren't already in the list | ||
| HookTheNewSynonymsToWord(existingWord, newSynonymIds); | ||
|
|
||
| //Add the word and its synonyms to all synonyms list | ||
| allSynonymIds.Add(existingWord.Id); | ||
| allSynonymIds.AddRange(existingWord.SynonymIds); | ||
| } | ||
| allSynonymIds = allSynonymIds.ToList(); | ||
|
|
||
| //Update newly added synonyms to have the references to all words | ||
| UpdateAllSynonymsOfSynonyms(allSynonymIds); | ||
|
|
||
| //Update the cache | ||
| _cache.Set(wordListCacheKey, _words); | ||
| return true; | ||
|
|
||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: Add,SomeOtherMethod
| return synonyms; | ||
| } | ||
|
|
||
| // @CodeScene(disable:"Complex Method") |
There was a problem hiding this comment.
❌ New issue: Complex Method
Add has a cyclomatic complexity of 29, threshold = 9
| return synonyms; | ||
| } | ||
|
|
||
| // @CodeScene(disable:"Complex Method") |
There was a problem hiding this comment.
✅ No longer an issue: Large Method
Add is no longer above the threshold for lines of code
| public bool SomeOtherMethod(string word, List<string> synonyms) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| //Remove all empty strings, or synonyms that are equal to word, and get Distinct values | ||
| synonyms.RemoveAll(s => string.IsNullOrWhiteSpace(s) || s == word); | ||
| synonyms = synonyms.Distinct().ToList(); | ||
|
|
||
| if (word == null || synonyms.Count == 0) return false; | ||
|
|
||
| //If the word that is a synonym already exists, get the ID. If not, add it | ||
| var synonymsFromCache = _words.Where(x => synonyms.Contains(x.WordString.ToLower())).ToList(); | ||
| var synonymIds = synonymsFromCache.Select(x => x.Id).ToList(); | ||
|
|
||
| //Get synonyms that are not already in cache | ||
| var synonymsNotInCache = synonyms.Where(s => !synonymsFromCache.Select(x => x.WordString).Contains(s)); | ||
|
|
||
| //Add those synonyms | ||
| var (newSynonymIds, nextId) = AddWordsToCache(_words.Count + 1, synonymIds, synonymsNotInCache); | ||
|
|
||
| //Now we have a list of all synonyms, new and old | ||
| var allSynonymIds = synonymIds.Concat(newSynonymIds).ToList(); | ||
|
|
||
| //Check if word already exists | ||
| var existingWord = _words.FirstOrDefault(x => x.WordString == word.ToLower()); | ||
|
|
||
| //If it doesn't, add the word and synonyms | ||
| if (existingWord == null) | ||
| { | ||
| //Add synonyms of synonyms | ||
| synonymsFromCache.ForEach(x => allSynonymIds.AddRange(x.SynonymIds)); | ||
|
|
||
| //Add new word and bind synonyms | ||
| _words.Add(new Word() { Id = nextId, WordString = word.ToLower(), SynonymIds = allSynonymIds.ToList() }); | ||
| allSynonymIds.Add(nextId); | ||
| } | ||
| else | ||
| { | ||
| //If it does, hook only synonyms that aren't already in the list | ||
| HookTheNewSynonymsToWord(existingWord, newSynonymIds); | ||
|
|
||
| //Add the word and its synonyms to all synonyms list | ||
| allSynonymIds.Add(existingWord.Id); | ||
| allSynonymIds.AddRange(existingWord.SynonymIds); | ||
| } | ||
| allSynonymIds = allSynonymIds.ToList(); | ||
|
|
||
| //Update newly added synonyms to have the references to all words | ||
| UpdateAllSynonymsOfSynonyms(allSynonymIds); | ||
|
|
||
| //Update the cache | ||
| _cache.Set(wordListCacheKey, _words); | ||
| return true; | ||
|
|
||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
ℹ New issue: Large Method
SomeOtherMethod has 104 lines, threshold = 70
| public bool SomeOtherMethod(string word, List<string> synonyms) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| //Remove all empty strings, or synonyms that are equal to word, and get Distinct values | ||
| synonyms.RemoveAll(s => string.IsNullOrWhiteSpace(s) || s == word); | ||
| synonyms = synonyms.Distinct().ToList(); | ||
|
|
||
| if (word == null || synonyms.Count == 0) return false; | ||
|
|
||
| //If the word that is a synonym already exists, get the ID. If not, add it | ||
| var synonymsFromCache = _words.Where(x => synonyms.Contains(x.WordString.ToLower())).ToList(); | ||
| var synonymIds = synonymsFromCache.Select(x => x.Id).ToList(); | ||
|
|
||
| //Get synonyms that are not already in cache | ||
| var synonymsNotInCache = synonyms.Where(s => !synonymsFromCache.Select(x => x.WordString).Contains(s)); | ||
|
|
||
| //Add those synonyms | ||
| var (newSynonymIds, nextId) = AddWordsToCache(_words.Count + 1, synonymIds, synonymsNotInCache); | ||
|
|
||
| //Now we have a list of all synonyms, new and old | ||
| var allSynonymIds = synonymIds.Concat(newSynonymIds).ToList(); | ||
|
|
||
| //Check if word already exists | ||
| var existingWord = _words.FirstOrDefault(x => x.WordString == word.ToLower()); | ||
|
|
||
| //If it doesn't, add the word and synonyms | ||
| if (existingWord == null) | ||
| { | ||
| //Add synonyms of synonyms | ||
| synonymsFromCache.ForEach(x => allSynonymIds.AddRange(x.SynonymIds)); | ||
|
|
||
| //Add new word and bind synonyms | ||
| _words.Add(new Word() { Id = nextId, WordString = word.ToLower(), SynonymIds = allSynonymIds.ToList() }); | ||
| allSynonymIds.Add(nextId); | ||
| } | ||
| else | ||
| { | ||
| //If it does, hook only synonyms that aren't already in the list | ||
| HookTheNewSynonymsToWord(existingWord, newSynonymIds); | ||
|
|
||
| //Add the word and its synonyms to all synonyms list | ||
| allSynonymIds.Add(existingWord.Id); | ||
| allSynonymIds.AddRange(existingWord.SynonymIds); | ||
| } | ||
| allSynonymIds = allSynonymIds.ToList(); | ||
|
|
||
| //Update newly added synonyms to have the references to all words | ||
| UpdateAllSynonymsOfSynonyms(allSynonymIds); | ||
|
|
||
| //Update the cache | ||
| _cache.Set(wordListCacheKey, _words); | ||
| return true; | ||
|
|
||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
❌ New issue: Bumpy Road Ahead
SomeOtherMethod has 13 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function
| public bool SomeOtherMethod(string word, List<string> synonyms) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| //Remove all empty strings, or synonyms that are equal to word, and get Distinct values | ||
| synonyms.RemoveAll(s => string.IsNullOrWhiteSpace(s) || s == word); | ||
| synonyms = synonyms.Distinct().ToList(); | ||
|
|
||
| if (word == null || synonyms.Count == 0) return false; | ||
|
|
||
| //If the word that is a synonym already exists, get the ID. If not, add it | ||
| var synonymsFromCache = _words.Where(x => synonyms.Contains(x.WordString.ToLower())).ToList(); | ||
| var synonymIds = synonymsFromCache.Select(x => x.Id).ToList(); | ||
|
|
||
| //Get synonyms that are not already in cache | ||
| var synonymsNotInCache = synonyms.Where(s => !synonymsFromCache.Select(x => x.WordString).Contains(s)); | ||
|
|
||
| //Add those synonyms | ||
| var (newSynonymIds, nextId) = AddWordsToCache(_words.Count + 1, synonymIds, synonymsNotInCache); | ||
|
|
||
| //Now we have a list of all synonyms, new and old | ||
| var allSynonymIds = synonymIds.Concat(newSynonymIds).ToList(); | ||
|
|
||
| //Check if word already exists | ||
| var existingWord = _words.FirstOrDefault(x => x.WordString == word.ToLower()); | ||
|
|
||
| //If it doesn't, add the word and synonyms | ||
| if (existingWord == null) | ||
| { | ||
| //Add synonyms of synonyms | ||
| synonymsFromCache.ForEach(x => allSynonymIds.AddRange(x.SynonymIds)); | ||
|
|
||
| //Add new word and bind synonyms | ||
| _words.Add(new Word() { Id = nextId, WordString = word.ToLower(), SynonymIds = allSynonymIds.ToList() }); | ||
| allSynonymIds.Add(nextId); | ||
| } | ||
| else | ||
| { | ||
| //If it does, hook only synonyms that aren't already in the list | ||
| HookTheNewSynonymsToWord(existingWord, newSynonymIds); | ||
|
|
||
| //Add the word and its synonyms to all synonyms list | ||
| allSynonymIds.Add(existingWord.Id); | ||
| allSynonymIds.AddRange(existingWord.SynonymIds); | ||
| } | ||
| allSynonymIds = allSynonymIds.ToList(); | ||
|
|
||
| //Update newly added synonyms to have the references to all words | ||
| UpdateAllSynonymsOfSynonyms(allSynonymIds); | ||
|
|
||
| //Update the cache | ||
| _cache.Set(wordListCacheKey, _words); | ||
| return true; | ||
|
|
||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
❌ New issue: Large Method
SomeOtherMethod has 104 lines, threshold = 70
| public bool SomeOtherMethod(string word, List<string> synonyms) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| //Remove all empty strings, or synonyms that are equal to word, and get Distinct values | ||
| synonyms.RemoveAll(s => string.IsNullOrWhiteSpace(s) || s == word); | ||
| synonyms = synonyms.Distinct().ToList(); | ||
|
|
||
| if (word == null || synonyms.Count == 0) return false; | ||
|
|
||
| //If the word that is a synonym already exists, get the ID. If not, add it | ||
| var synonymsFromCache = _words.Where(x => synonyms.Contains(x.WordString.ToLower())).ToList(); | ||
| var synonymIds = synonymsFromCache.Select(x => x.Id).ToList(); | ||
|
|
||
| //Get synonyms that are not already in cache | ||
| var synonymsNotInCache = synonyms.Where(s => !synonymsFromCache.Select(x => x.WordString).Contains(s)); | ||
|
|
||
| //Add those synonyms | ||
| var (newSynonymIds, nextId) = AddWordsToCache(_words.Count + 1, synonymIds, synonymsNotInCache); | ||
|
|
||
| //Now we have a list of all synonyms, new and old | ||
| var allSynonymIds = synonymIds.Concat(newSynonymIds).ToList(); | ||
|
|
||
| //Check if word already exists | ||
| var existingWord = _words.FirstOrDefault(x => x.WordString == word.ToLower()); | ||
|
|
||
| //If it doesn't, add the word and synonyms | ||
| if (existingWord == null) | ||
| { | ||
| //Add synonyms of synonyms | ||
| synonymsFromCache.ForEach(x => allSynonymIds.AddRange(x.SynonymIds)); | ||
|
|
||
| //Add new word and bind synonyms | ||
| _words.Add(new Word() { Id = nextId, WordString = word.ToLower(), SynonymIds = allSynonymIds.ToList() }); | ||
| allSynonymIds.Add(nextId); | ||
| } | ||
| else | ||
| { | ||
| //If it does, hook only synonyms that aren't already in the list | ||
| HookTheNewSynonymsToWord(existingWord, newSynonymIds); | ||
|
|
||
| //Add the word and its synonyms to all synonyms list | ||
| allSynonymIds.Add(existingWord.Id); | ||
| allSynonymIds.AddRange(existingWord.SynonymIds); | ||
| } | ||
| allSynonymIds = allSynonymIds.ToList(); | ||
|
|
||
| //Update newly added synonyms to have the references to all words | ||
| UpdateAllSynonymsOfSynonyms(allSynonymIds); | ||
|
|
||
| //Update the cache | ||
| _cache.Set(wordListCacheKey, _words); | ||
| return true; | ||
|
|
||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
❌ New issue: Bumpy Road Ahead
SomeOtherMethod has 13 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function
| public bool AddTest(string word) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| return true; | ||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
❌ New issue: Bumpy Road Ahead
AddTest has 3 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function
| public bool SomeOtherMethod(string word, List<string> synonyms) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "BB") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| //Remove all empty strings, or synonyms that are equal to word, and get Distinct values | ||
| synonyms.RemoveAll(s => string.IsNullOrWhiteSpace(s) || s == word); | ||
| synonyms = synonyms.Distinct().ToList(); | ||
|
|
||
| if (word == null || synonyms.Count == 0) return false; | ||
|
|
||
| //If the word that is a synonym already exists, get the ID. If not, add it | ||
| var synonymsFromCache = _words.Where(x => synonyms.Contains(x.WordString.ToLower())).ToList(); | ||
| var synonymIds = synonymsFromCache.Select(x => x.Id).ToList(); | ||
|
|
||
| //Get synonyms that are not already in cache | ||
| var synonymsNotInCache = synonyms.Where(s => !synonymsFromCache.Select(x => x.WordString).Contains(s)); | ||
|
|
||
| //Add those synonyms | ||
| var (newSynonymIds, nextId) = AddWordsToCache(_words.Count + 1, synonymIds, synonymsNotInCache); | ||
|
|
||
| //Now we have a list of all synonyms, new and old | ||
| var allSynonymIds = synonymIds.Concat(newSynonymIds).ToList(); | ||
|
|
||
| //Check if word already exists | ||
| var existingWord = _words.FirstOrDefault(x => x.WordString == word.ToLower()); | ||
|
|
||
| //If it doesn't, add the word and synonyms | ||
| if (existingWord == null) | ||
| { | ||
| //Add synonyms of synonyms | ||
| synonymsFromCache.ForEach(x => allSynonymIds.AddRange(x.SynonymIds)); | ||
|
|
||
| //Add new word and bind synonyms | ||
| _words.Add(new Word() { Id = nextId, WordString = word.ToLower(), SynonymIds = allSynonymIds.ToList() }); | ||
| allSynonymIds.Add(nextId); | ||
| } | ||
| else | ||
| { | ||
| //If it does, hook only synonyms that aren't already in the list | ||
| HookTheNewSynonymsToWord(existingWord, newSynonymIds); | ||
|
|
||
| //Add the word and its synonyms to all synonyms list | ||
| allSynonymIds.Add(existingWord.Id); | ||
| allSynonymIds.AddRange(existingWord.SynonymIds); | ||
| } | ||
| allSynonymIds = allSynonymIds.ToList(); | ||
|
|
||
| //Update newly added synonyms to have the references to all words | ||
| UpdateAllSynonymsOfSynonyms(allSynonymIds); | ||
|
|
||
| //Update the cache | ||
| _cache.Set(wordListCacheKey, _words); | ||
| return true; | ||
|
|
||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
❌ New issue: Deep, Nested Complexity
SomeOtherMethod has a nested complexity depth of 20, threshold = 4
| public bool AddTest(string word) | ||
| { | ||
| try | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| else if (word.Contains("B")) | ||
| { | ||
| if (word == "BA") | ||
| { | ||
|
|
||
| } | ||
| else if (word == "BB") | ||
| { | ||
| if (word == "A") | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } | ||
| else if (word == "C") | ||
| { | ||
|
|
||
| } | ||
| return true; | ||
| } | ||
| catch (Exception) | ||
| { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
❌ New issue: Deep, Nested Complexity
AddTest has a nested complexity depth of 5, threshold = 4
No description provided.