Java icon indicating copy to clipboard operation
Java copied to clipboard

style: resolve some `FCBL_FIELD_COULD_BE_LOCAL` warnings

Open vil02 opened this issue 1 year ago • 1 comments

Continuation of #5126.

Please note that there are still some warnings/errors related to that check left:

[ERROR] Medium: Class com.thealgorithms.datastructures.bags.Bag$Node defines fields that are used only as locals [com.thealgorithms.datastructures.bags.Bag$Node] In Bag.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.bags.Bag$Node defines fields that are used only as locals [com.thealgorithms.datastructures.bags.Bag$Node] In Bag.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.caches.LFUCache$Node defines fields that are used only as locals [com.thealgorithms.datastructures.caches.LFUCache$Node] At LFUCache.java:[line 45] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.caches.LFUCache$Node defines fields that are used only as locals [com.thealgorithms.datastructures.caches.LFUCache$Node] At LFUCache.java:[line 43] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.caches.LFUCache$Node defines fields that are used only as locals [com.thealgorithms.datastructures.caches.LFUCache$Node] In LFUCache.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.caches.LFUCache$Node defines fields that are used only as locals [com.thealgorithms.datastructures.caches.LFUCache$Node] In LFUCache.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.caches.LFUCache$Node defines fields that are used only as locals [com.thealgorithms.datastructures.caches.LFUCache$Node] At LFUCache.java:[line 44] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.crdt.ORSet$Pair defines fields that are used only as locals [com.thealgorithms.datastructures.crdt.ORSet$Pair] At ORSet.java:[line 179] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.graphs.Kruskal$Edge defines fields that are used only as locals [com.thealgorithms.datastructures.graphs.Kruskal$Edge] At Kruskal.java:[line 27] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.graphs.Kruskal$Edge defines fields that are used only as locals [com.thealgorithms.datastructures.graphs.Kruskal$Edge] At Kruskal.java:[line 28] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.graphs.Kruskal$Edge defines fields that are used only as locals [com.thealgorithms.datastructures.graphs.Kruskal$Edge] At Kruskal.java:[line 29] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.heaps.FibonacciHeap$HeapNode defines fields that are used only as locals [com.thealgorithms.datastructures.heaps.FibonacciHeap$HeapNode] In FibonacciHeap.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.heaps.FibonacciHeap$HeapNode defines fields that are used only as locals [com.thealgorithms.datastructures.heaps.FibonacciHeap$HeapNode] In FibonacciHeap.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.heaps.LeftistHeap$Node defines fields that are used only as locals [com.thealgorithms.datastructures.heaps.LeftistHeap$Node] At LeftistHeap.java:[line 24] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.heaps.LeftistHeap$Node defines fields that are used only as locals [com.thealgorithms.datastructures.heaps.LeftistHeap$Node] At LeftistHeap.java:[line 25] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.heaps.LeftistHeap$Node defines fields that are used only as locals [com.thealgorithms.datastructures.heaps.LeftistHeap$Node] At LeftistHeap.java:[line 27] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.heaps.LeftistHeap$Node defines fields that are used only as locals [com.thealgorithms.datastructures.heaps.LeftistHeap$Node] At LeftistHeap.java:[line 26] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.lists.MergeKSortedLinkedList$Node defines fields that are used only as locals [com.thealgorithms.datastructures.lists.MergeKSortedLinkedList$Node] In MergeKSortedLinkedList.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.lists.MergeKSortedLinkedList$Node defines fields that are used only as locals [com.thealgorithms.datastructures.lists.MergeKSortedLinkedList$Node] In MergeKSortedLinkedList.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.trees.AVLTree$Node defines fields that are used only as locals [com.thealgorithms.datastructures.trees.AVLTree$Node] In AVLTree.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.trees.AVLTree$Node defines fields that are used only as locals [com.thealgorithms.datastructures.trees.AVLTree$Node] In AVLTree.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.trees.AVLTree$Node defines fields that are used only as locals [com.thealgorithms.datastructures.trees.AVLTree$Node] At AVLTree.java:[line 17] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.trees.AVLTree$Node defines fields that are used only as locals [com.thealgorithms.datastructures.trees.AVLTree$Node] In AVLTree.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.trees.AVLTree$Node defines fields that are used only as locals [com.thealgorithms.datastructures.trees.AVLTree$Node] At AVLTree.java:[line 18] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.trees.AVLTree$Node defines fields that are used only as locals [com.thealgorithms.datastructures.trees.AVLTree$Node] In AVLTree.java FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.trees.Treap$TreapNode defines fields that are used only as locals [com.thealgorithms.datastructures.trees.Treap$TreapNode] At Treap.java:[line 39] FCBL_FIELD_COULD_BE_LOCAL
[ERROR] Medium: Class com.thealgorithms.datastructures.trees.Treap$TreapNode defines fields that are used only as locals [com.thealgorithms.datastructures.trees.Treap$TreapNode] At Treap.java:[line 40] FCBL_FIELD_COULD_BE_LOCAL

They are all related to local classes. At the moment I am not sure how to handle them.

  • [x] I have read CONTRIBUTING.md.
  • [x] This pull request is all my own work -- I have not plagiarized it.
  • [x] All filenames are in PascalCase.
  • [x] All functions and variable names follow Java naming conventions.
  • [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • [x] All new code is formatted with clang-format -i --style=file path/to/your/file.java

vil02 avatar Oct 13 '24 07:10 vil02

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 64.13%. Comparing base (9b52ac9) to head (caa5dae).

Files with missing lines Patch % Lines
...om/thealgorithms/datastructures/graphs/Cycles.java 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5764      +/-   ##
============================================
- Coverage     64.14%   64.13%   -0.02%     
+ Complexity     4205     4204       -1     
============================================
  Files           587      587              
  Lines         16390    16388       -2     
  Branches       3163     3163              
============================================
- Hits          10513    10510       -3     
  Misses         5448     5448              
- Partials        429      430       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 13 '24 07:10 codecov-commenter