Giter Club home page Giter Club logo

d-scanner's People

Contributors

andre2007 avatar andrejmitrovic avatar bbasile avatar belka-ew avatar brad-anderson avatar brianush1 avatar callumenator avatar dhasenan avatar dlang-bot avatar dmitryolshansky avatar edi33416 avatar hackerpilot avatar idanarye avatar jmaschme avatar kubo39 avatar laurenttreguier avatar liranz avatar martinnowak avatar moonlightsentinel avatar patha454 avatar petarkirov avatar razvann7 avatar skl131313 avatar smolt avatar some-bot avatar timotheecour avatar webfreak001 avatar wilzbach avatar workhorsy avatar zyedidia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

d-scanner's Issues

Is there a way for easy communication?

I've sent you an email (found on dlang.org), but probably there is some better way to contact you?
Also, what is your time zone? When would it be (potentially) convenient to ask questions, if I have any?

Automated tests are needed

It would be great to have automated smoke tests to check that most important functionality is not broken after changes.

If not possible, at least manual instructions what to check and how.

Properly handle unnamed enums

Currently Dscanner doesn't parse enum members in situation like
enum { ... }
i.e. when no name is given. Dscanner supposes there is always a name (if I understand correctly)

ctags doesn't work with phobos

dscanner --ctags dmd_root/src/phobos/std/algorithm.d > out_ctags.txt
std.format.FormatException@dmd_root/src/phobos/std/string.d(2536): Orphan format arguments: args[4..5]

Linker error

I'm on windows and get these errors/warning if I run the build.bat:

C:\Users\Besitzer\Documents\Github\Dscanner>dmd main.d stats.d imports.d highlig
hter.d ctags.d astprinter.d outliner.d stdx/d/lexer.d stdx/d/parser.d stdx/d/ent
ities.d stdx/d/ast.d -wi -ofdscanner
stdx\d\parser.d(390): Warning: statement is not reachable
stdx\d\parser.d(405): Warning: statement is not reachable
stdx\d\parser.d(419): Warning: statement is not reachable
stdx\d\parser.d(433): Warning: statement is not reachable
stdx\d\parser.d(452): Warning: statement is not reachable
stdx\d\parser.d(466): Warning: statement is not reachable
stdx\d\parser.d(480): Warning: statement is not reachable
stdx\d\parser.d(494): Warning: statement is not reachable
stdx\d\parser.d(508): Warning: statement is not reachable
stdx\d\parser.d(526): Warning: statement is not reachable
stdx\d\parser.d(540): Warning: statement is not reachable
stdx\d\parser.d(554): Warning: statement is not reachable
stdx\d\parser.d(591): Warning: statement is not reachable
stdx\d\parser.d(611): Warning: statement is not reachable
stdx\d\parser.d(625): Warning: statement is not reachable
stdx\d\parser.d(3680): Warning: statement is not reachable
stdx\d\parser.d(5655): Warning: statement is not reachable
OPTLINK (R) for Win32 Release 8.00.13
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
dscanner.obj(dscanner)
Error 42: Symbol Undefined _D9formatter7__arrayZ
dscanner.obj(dscanner)
Error 42: Symbol Undefined _D9formatter12__ModuleInfoZ
--- errorlevel 2

alias do not appear in JSON output

I tried Dscanner with the --json flag and alias declarations

alias int MyInt;

are not recognized. They do not appear in the JSON file, at least.

libevent doesn't work

Hi. Trying to run --ctags on some dub packages:

~/code/d/Dscanner/dscanner /home/simendsjo/.dub/packages/libevent-master --recursive --ctags
[1]    1316 segmentation fault (core dumped)  ~/code/d/Dscanner/dscanner /home/simendsjo/.dub/packages/libevent-master

Feature Request: Support parsing files from stdin

Integrating completion with an editor will require saving the file (either directly or to a temporary location) before running dscanner. If you support reading the file from stdin as an alternative to a file, you can avoid this issue.

Build error in autocomplete.d

autocomplete.d(237): Error: function langutils.combineTokens (ref const(Token[]) tokens) is not callable using argument types (const(Token)[])
/usr/include/d/std/range.d(611): Error: static assert "Cannot put a char[] into a Appender!(char[])"
/usr/include/d/std/array.d(1493): instantiated from here: put!(Appender!(char[]), char[])
autocomplete.d(341): instantiated from here: join!(MapResult!(unaryFun, const(Token)[]), string)
make: *** [all] Error 1

Recursive option for ctags generation

Add a --recursive option to the ctags generation option so that a tags file can be generated for an entire directory at once. Switch should be --recursive or -R

More AST classes should have location information

Location information makes the AST more useful for applications such as static code analysis. Right now it's possible to use the --ast option and xmllint to do things like search for if statements without braces, but you can't say where in the source file it happened.

Switch statement and With statement

DMD 2.063 accepts the following:

enum Foo { Bar, Baz }

void main(string[] args)
{
    Foo foo;
    final switch (foo) with (Foo)
    {
        case Bar: break;
        case Baz: break;
    }
} 

Dscanner expects a '{' after the switch test and reports the following errors when using ---syntaxCheck:

test_switch.d(7:21)[error]: Expected { instead of with
test_switch.d(0:1)[error]: Expected } instead of EOF

parsing templates

I have started using Dscanner to extract info about phobos modules. Currently not everything seems to be parsed. For example, in std.functional, the only functions I get back from Dscanner are adjoin and toDelegate.

Is this a known parsing issue (something to do with templates maybe) or must I be doing something wrong to not see all the function definitions?

Thanks and great tool!

Dscanner --json doesn't print variables

dscanner doesn't output variables info with --json option.

it would be useful if it can return info about a,b inside function main.

int main()
{
int a;
string b;
return 0;
}

Feature request: provide mechanism to know whether errors have been found

Some editors can display errors as you type. E.g., Visual Studio. Other tools might also benefit from having diagnostic information available.

Example design would be to add a parameter to tokenize():
Token[] tokenize(S)(S inputString, void delegate(string) logMessage, IterationStyle iterationStyle = IterationStyle.CODE_ONLY) if (isSomeString!S)

logMessage() would by default write to stderr.

Of course, details may vary, the concept could be generalized or implemented totally differently. For example, you might want to add command line arguments to specify logFileName or to pass formatString. Error code could be returned from main to indicate that error log is not empty.

compile error : isAlpha

stdx/d/lexer.d(1663): Error: std.uni.isAlpha at phobos/std/uni.d(7063) conflicts with std.ascii.isAlpha at phobos/std/ascii.d(92)

I get this error after upgrading to git master.
should it be std.uni.isAlpha or std.ascii.isAlpha?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.