mirror of
https://github.com/ejwa/gitinspector.git
synced 2025-03-22 00:08:16 +01:00
Analyzed extensions are now marked when the -l switch is used.
This is extremely useful and shows exactly what files are actually used when gitinspector generates the statistics.
This commit is contained in:
parent
676cb5c114
commit
ffbf4c3e90
2 changed files with 14 additions and 7 deletions
|
@ -17,6 +17,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with gitinspector. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import changes
|
||||
import terminal
|
||||
|
||||
__default_extensions__ = ["java", "c", "cpp", "h", "hpp", "py", "glsl", "rb", "js", "sql"]
|
||||
__extensions__ = __default_extensions__
|
||||
__located_extensions__ = set()
|
||||
|
@ -32,5 +35,13 @@ def add_located(string):
|
|||
if len(string) > 0:
|
||||
__located_extensions__.add(string)
|
||||
|
||||
def get_located():
|
||||
return __located_extensions__
|
||||
def output():
|
||||
if __located_extensions__:
|
||||
print "\nThe extensions below were found in the repository history"
|
||||
print "(extensions used during statistical analysis are marked):"
|
||||
|
||||
for i in __located_extensions__:
|
||||
if i in __extensions__:
|
||||
print "[" + terminal.__bold__ + i + terminal.__normal__ + "]",
|
||||
else:
|
||||
print i,
|
||||
|
|
|
@ -56,11 +56,7 @@ class Runner:
|
|||
missing.output()
|
||||
|
||||
if self.list_file_types:
|
||||
ex = extensions.get_located()
|
||||
if (ex):
|
||||
print "\nThe extensions below were found in the repository history:"
|
||||
for i in extensions.get_located():
|
||||
print i,
|
||||
extensions.output()
|
||||
|
||||
if __name__ == "__main__":
|
||||
__run__ = Runner()
|
||||
|
|
Loading…
Add table
Reference in a new issue