2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Two flavors of unused variable values |
From: | Karl Vestin via Core-talk <core-talk at aps.anl.gov> |
To: | "core-talk at aps.anl.gov" <core-talk at aps.anl.gov> |
Date: | Thu, 13 Feb 2020 11:22:26 +0000 |
Dear all, Going through the Codacy logs and trying to filter out background noise I have come across two similar code patterns that are generating a fair number of issues: 1)
Variable 'var' is reassigned a value before the old one has been used. 2)
Variable 'varname' is assigned a value that is never used. Often these unused variable values are of the type “status” or “counter” and may be useful for debugging. In some code standards these patterns are banned. But my gut feeling is that we do not want to enforce that, hence I would propose we remove these rules for Codacy. Any opinions on this topic? Karl Vestin Group Leader Hardware and Integration Integrated Control Systems Division European Spallation Source ERIC +46721792066 P.O Box 176, SE 221 00 Lund, Sweden Visiting address: Odarslövsvägen 113, Lund |