Commit Graph

14 Commits

Author SHA1 Message Date
lucica28 7c9f8cb97b replace libdparse in objectconst functionality + unittests integration with dmd (#17)
* replace libdparse in objectconst functionality + unittests integration with dmd

* updated dmd

* run tests

* use templates

* visit aggregate declaration

* updated dmd

* solve linter seg fault

* get rid of dup + refactor

* fix typo
2025-08-29 13:16:44 +03:00
SixthDot 9076f7bab3
docs(dscanner/utils): Update obsolete url in comment (#944)
Co-authored-by: Petar Kirov <petar.p.kirov@gmail.com>
2024-01-01 11:08:09 +02:00
Axel Ricard 87f85c7db7 add some utils functions for path manipulation 2023-10-11 00:34:00 +02:00
WebFreak001 4194e6af0c add `dscanner fix` command 2023-07-08 23:09:33 +02:00
WebFreak001 bad253bad5 remove unused variables 2023-06-29 14:57:32 +02:00
H Paterson 064be72ee7
Fix imports
Because I'm rubbish at programming.
2020-03-21 18:58:07 +13:00
H Paterson 7f10a0598a
Fix find function
Use `canFind`, not `find` - which returns the post-string, not a boolean.
2020-03-21 18:56:58 +13:00
H Paterson 497a900f21
Exclude all hidden directories. 2020-03-21 18:52:00 +13:00
H Paterson 346d11f5e0
Exclude `.git` from search paths.
Currently dscanner searches for files in the target directory ending in `.d` or `.di`.

Git has some hidden files in `.git`, which log commits to files. These files share the same name as the tracked file: For example `.git/logs/refs/heads/somedfile.d` actually contains Git data, not D code.

A naive call to dscanner using `dscanner --syntaxCheck` or `dscanner --styleCheck` (therefore also `dub lint...`) will attempt to check these Git files, resulting in spurious errors, such as:
```sh
./.git/logs/refs/heads/charstream.d(1:1)[error]:
./.git/logs/refs/heads/charstream.d(1:118)[warn]: Line is longer than 120 characters
```

I believe Git is a common enough tool that we're justified to handle this case inside D scanner, rather than asking the user to write configuration files with dodge the `.git` folder.
2020-03-21 18:28:59 +13:00
Nathan Sashihara 383fcb84d8 Fix byte order mark stripping (#740)
Fix byte order mark stripping
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2019-01-01 11:13:09 +01:00
BBasile f585c383f1
update to dparse 0.10.x (#713) 2018-11-22 22:57:25 +01:00
Basile Burg 4231deb046 fix all cases of mixed tabs and spaces 2018-04-07 22:09:39 +02:00
Basile Burg 6e7c366e49 fix #278 - Weird: UTF-16LE encoding is unsupported 2018-04-04 16:37:23 +02:00
BBasile cb31d2501e
add IZ safeAccess util and refactor several && chains with it (#577)
* add IZ safeAccess util and refactor several && chains with it

* show how to make inference working
2018-04-02 17:29:36 +02:00