You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "panbingkun (via GitHub)" <gi...@apache.org> on 2023/05/19 01:08:18 UTC

[GitHub] [spark] panbingkun commented on pull request #41218: [SPARK-43576][CORE] Remove unused declarations from Core module

panbingkun commented on PR #41218:
URL: https://github.com/apache/spark/pull/41218#issuecomment-1553870280

   > @panbingkun how did you find them?
   > 
   > FWIW, I thought we added a compilation feature to disallow unused variables IIRC, @LuciferYang .
   
   @HyukjinKwon 
   
   1.When I review the HadoopRDD code, I noticed some inspection prompts, eg:
   <img width="808" alt="image" src="https://github.com/apache/spark/assets/15246973/4dc7c9b9-a549-4e32-a0cf-679a236f13b1">
   
   2.So I wonder if there are other cases in the core module, then I export `unused declaration` rule to single file, name as `unused_declaration.xml`
   <img width="443" alt="image" src="https://github.com/apache/spark/assets/15246973/be2d73d6-a900-4a33-9927-91f9e191703c">
   
   3.execute command:
   "/Users/panbingkun/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/231.9011.34/IntelliJ IDEA CE.app/Contents/bin/inspect.sh" /Users/panbingkun/Developer/spark/spark-community /Users/panbingkun/Developer/spark/spark-community/unused_declaration.xml /Users/panbingkun/Developer/spark/spark-community/unused_declaration_results -v2 -d /Users/panbingkun/Developer/spark/spark-community/core/src
   
   4.The declared unused variable results in all `core` modules will be saved in the `unused_declaration_results` file.
   
   5.Open it by IDE.
   <img width="695" alt="image" src="https://github.com/apache/spark/assets/15246973/74096512-4f09-4fab-8678-97e6a59cd85c">
   
   6.Some inspect results may be inaccurate and ultimately require manual reconfirmation.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org