Bug Description:
When using cloc to calculate the code size of XML files, some XML files were missed in the statistics.
cloc; OS; OS version:
cloc version: V2.02
Perl version (if running the cloc source): Unknown
OS: Windows
OS version: 10 Pro
Steps to Reproduce:
Command: cloc-2.02 --csv --out=report.csv --by-file C:\source
Expected Result:
All of XML files could be correctly counted.
Actual Result:
The XML declaration with a space before the last of question mark,this XML file is not included in the statistics.
Additional Context:
The issue appears to be related to the writing style of the XML declaration statement on the first line. The code size is recorded correctly when the declaration is written as:
xml
-<?xml version="1.0" encoding="Shift_JIS" ?> (before ? has blank)
However, the XML file is not included in the statistics when it is written with a space before the last of question mark:
xml
-<xml version="1.0" encoding="Shift_JIS"?>(before ? hasn't blank)
The presence of a space before the question mark in the declaration statement is non-standard. The standard format should not have a space before the question mark, and the version with a space is incorrect.
It is hoped that when the XML file is written according to standard conventions, the tool will correctly count the code for sizing purposes.
Bug Description: When using cloc to calculate the code size of XML files, some XML files were missed in the statistics.
cloc; OS; OS version:
cloc version: V2.02 Perl version (if running the cloc source): Unknown OS: Windows OS version: 10 Pro Steps to Reproduce: Command: cloc-2.02 --csv --out=report.csv --by-file C:\source
Expected Result: All of XML files could be correctly counted.
Actual Result: The XML declaration with a space before the last of question mark,this XML file is not included in the statistics.
Additional Context: The issue appears to be related to the writing style of the XML declaration statement on the first line. The code size is recorded correctly when the declaration is written as:
xml -<?xml version="1.0" encoding="Shift_JIS" ?> (before ? has blank) However, the XML file is not included in the statistics when it is written with a space before the last of question mark:
xml -<xml version="1.0" encoding="Shift_JIS"?>(before ? hasn't blank) The presence of a space before the question mark in the declaration statement is non-standard. The standard format should not have a space before the question mark, and the version with a space is incorrect.
It is hoped that when the XML file is written according to standard conventions, the tool will correctly count the code for sizing purposes.