Skip to content

style: resolve some FCBL_FIELD_COULD_BE_LOCAL warnings #5764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 13, 2024

Conversation

vil02
Copy link
Member

@vil02 vil02 commented Oct 13, 2024

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.

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

@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2024

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 ⚠️
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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vil02 vil02 force-pushed the include_FCBL_FIELD_COULD_BE_LOCAL branch from bb320f8 to 86da984 Compare October 13, 2024 07:58
@vil02 vil02 changed the title style: include FCBL_FIELD_COULD_BE_LOCAL style: resolve some FCBL_FIELD_COULD_BE_LOCAL warnings Oct 13, 2024
@vil02 vil02 marked this pull request as ready for review October 13, 2024 08:08
@vil02 vil02 force-pushed the include_FCBL_FIELD_COULD_BE_LOCAL branch from 86da984 to b17d9fe Compare October 13, 2024 08:57
@vil02 vil02 force-pushed the include_FCBL_FIELD_COULD_BE_LOCAL branch from b17d9fe to 164eda5 Compare October 13, 2024 10:40
@vil02 vil02 enabled auto-merge (squash) October 13, 2024 10:41
@vil02 vil02 merged commit ebc3cd2 into TheAlgorithms:master Oct 13, 2024
6 checks passed
@vil02 vil02 deleted the include_FCBL_FIELD_COULD_BE_LOCAL branch October 13, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants