[WIP] Add Go tool

Review Request #10302 — Created Nov. 1, 2018 and updated

ammar
ReviewBot
master
10095
935d343...
reviewbot, students
Add Go tool

Add more support for the Go language. This patch adds a Go Tool class which
runs two commands on go files:

1) go tool vet # static code analysis to find possible bugs or suspicious
constructs

2) gofmt # formats the code

  • 0
  • 0
  • 9
  • 0
  • 9
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

ammar
Review request changed

Commit:

-0437f12a63e70c4f5451df2ac466e46de23e795a
+32b2511d6d2f75bda3aece4e796e46f6f961c080

Diff:

Revision 2 (+92)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

ammar
Review request changed

Commit:

-32b2511d6d2f75bda3aece4e796e46f6f961c080
+935d343aed4b1f6e4ed7a8944c7ac627d6329a90

Diff:

Revision 3 (+92)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
brennie
  1. 
      
  2. bot/reviewbot/tools/go.py (Diff revision 3)
     
     

    Single quotes.

  3. bot/reviewbot/tools/go.py (Diff revision 3)
     
     

    No blank line here.

  4. bot/reviewbot/tools/go.py (Diff revision 3)
     
     

    We might want to make a note that we are using gofmt over go fmt because the former does not allow us to specify options that we want to use.

  5. bot/reviewbot/tools/go.py (Diff revision 3)
     
     

    In the case of a string that contains single quotes, it is more readable to use double quotes, e.g.

    "%s's formatting differs from gofmt's"

  6. bot/reviewbot/tools/go.py (Diff revision 3)
     
     

    No blank line here.

  7. bot/reviewbot/tools/go.py (Diff revision 3)
     
     

    I think this is a typo because line.split(':', 1) will always two values if : is in line. Should this say If split does not return two values?

    Also this should be in the except block.

    Comments must be proper sentences.

  8. 
      
Loading...