Giter VIP home page Giter VIP logo

sublimelinter-gotype's Issues

gotype fails to include other files in the same package

Really love this plugin, but it has one fatal flaw which is that when passing gotype a single filename, it will ignore other files in the same package, so you get undeclared name errors constantly.

It seems to me that you could locate the directory the file is in, run gotype -e <dir>, then filter the errors that it dumps out to only that file.

Linter skips _test.go files

I can see errors in regular go files but I cannot see errors in my _test.go files in the same package. I tried to use argument "-t" but I get an error:

Traceback (most recent call last):
  File "/Users/nicholasphillips/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/queue.py", line 65, in loop
    self.lint(view_id, timestamp)
  File "/Users/nicholasphillips/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/queue.py", line 111, in lint
    self.callback(view_id, timestamp)
  File "/Users/nicholasphillips/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/sublimelinter.py", line 120, in lint
    Linter.lint_view(view, filename, code, hit_time, callback)
  File "/Users/nicholasphillips/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/linter.py", line 929, in lint_view
    linter.lint(hit_time)
  File "/Users/nicholasphillips/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/linter.py", line 1410, in lint
    for match, line, col, error, warning, message, near in self.find_errors(output):
  File "/Users/nicholasphillips/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/linter.py", line 1749, in find_errors
    yield self.split_match(self.regex.match(line.rstrip()))
  File "linter in /Users/nicholasphillips/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter-contrib-gotype.sublime-package", line 43, in split_match
AttributeError: 'NoneType' object has no attribute 'group'

Gotype fails to import subpackages of the same project

Say you have a project that is organized as follows:

$GOPATH/
+src/
 +name/
  +a/
   +a.go
  +b/
   +b.go

It is perfectly legal for b.go to have a line such as import name/a. However, in the current setup, gotype fails to do the import (presumably because of the way files are copied to the temp directory). As a result, I get a ton of lint errors on everything that uses that package, even though the code will run just fine.

I am currently forced to run gotype with the following ignore_match settings:

"could not import [a-z/]* \\(can't find import: [a-z/]*\\)",
"undeclared name: [a-zA-Z_]*"

I was wondering if there is something I am doing wrong, or if this is a bug in the plugin.

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.