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

Cloc doesn't count correctly Visual Basic code #817

Closed
PavelTurk opened this issue Mar 2, 2024 · 1 comment
Closed

Cloc doesn't count correctly Visual Basic code #817

PavelTurk opened this issue Mar 2, 2024 · 1 comment

Comments

@PavelTurk
Copy link

Describe the bug
Cloc has problems with Visual Basic code

cloc; OS; OS version

  • cloc version:
  • If running the cloc source, Perl version:
  • OS (eg Linux, Windows, macOS, etc):
  • OS version:

To Reproduce

BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "cFunctionsAVI"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False

save to test.bas and

cloc . --strip-str-comments
       1 text file.
       1 unique file.                              
       0 files ignored.

github.com/AlDanial/cloc v 1.99  T=0.01 s (126.6 files/s, 1519.5 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Visual Basic                     1              0             12              0
-------------------------------------------------------------------------------

Expected result
I expect 0 comment and 12 code

Additional context
Add any other context about the problem here.

@PavelTurk
Copy link
Author

I understood. Attribute header is considered to be comment

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

1 participant