Skip to content
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

.net projects and .config files #374

Open
StephaneG31 opened this issue Feb 28, 2019 · 3 comments
Open

.net projects and .config files #374

StephaneG31 opened this issue Feb 28, 2019 · 3 comments

Comments

@StephaneG31
Copy link

StephaneG31 commented Feb 28, 2019

.net projects (in windows) use .config files which are in XML Format.
It will be great if cloc can count this kind of files

@AlDanial
Copy link
Owner

AlDanial commented Mar 7, 2019

The unfortunate thing is that .config is so generic and could contain anything and used by many different programs. I wonder why Microsoft couldn't just stick a .xml extension at the end?

In any case you can force cloc to treat .config files as XML files two different ways. First with

cloc --force-lang=XML,config   your_dotnet_proj/

and second, with a custom language filter, ref https://github.com/AlDanial/cloc#create-custom-language-definitions-

@iSeiryu
Copy link

iSeiryu commented Mar 15, 2023

The dotnet project files have .csproj and .fsproj extensions for C# and F#. There is also VB but I don't remember the extension.

@AlDanial
Copy link
Owner

.csproj and .fsproj are already recognized:

» cloc --show-ext csproj
csproj          -> MSBuild script

» cloc --show-ext fsproj
fsproj          -> XML

Difficult to say which association is most applicable: dotnet, XML, C#, F#, MS Build

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

No branches or pull requests

3 participants