Commit Graph
28 Commits
Author SHA1 Message Date
Bjorn Neergaard dc99282f79 Clean up some test filenames and extraneous code 2016-10-22 08:53:28 -05:00
Bjorn Neergaard 99aebcafac Docs! 2016-10-22 08:31:29 -05:00
Bjorn Neergaard f49f615ef6 Add support for dot-seperate linters, improve linter tests
This PR first and formost implements support for dot-seperate filetypes,
a very trivial change.

This closes #132

But more importantly, this PR vastly improves the test quality for
`ale#linter#Get`. It enables us to reset the state of ale's internal
linter cache, to facilitate better testing, as well as making use of
mocked linters instead of depending on linters on disk (which may
change). In addition, a dummy linter is defined to test the autoloading
behavior.

Header guards were removed from all linters as:

* A: ale won't try and load linters if they already exist in memory
* B: we can't reset state for testing if they can't be loaded again
2016-10-21 21:02:20 -05:00
Bjorn Neergaard c697ef05bb Add PEP8 handler test. 2016-10-20 22:52:25 -05:00
Bjorn Neergaard a2e4af1626 Document ansible-lint 2016-10-20 09:27:57 -05:00
Bjorn Neergaard c34664120b Add ansible-lint support and factor out PEP8 handler 2016-10-20 09:23:23 -05:00
Bjorn Neergaard 0e6f406fe0 Add autocommand test 2016-10-17 20:14:21 -05:00
Bjorn Neergaard 3a20587502 Document ALELint autocommand 2016-10-13 15:05:42 +01:00
Bjorn Neergaard f37896a898 Implement autocommand support 2016-10-13 15:05:42 +01:00
Bjorn Neergaard f74d4938d0 Cleanup vimrc rtp 2016-10-13 08:54:07 -05:00
Bjorn Neergaard 6e789c33b0 Add statusline tests 2016-10-13 08:52:53 -05:00
Bjorn Neergaard d7b36e0cf2 Make statusline initial updates more elegant 2016-10-13 08:51:40 -05:00
Bjorn Neergaard dc58db7640 Implement a more efficient statusbar
The statusbar now keeps its state in a separate variable, in order to
avoid excess iterations. The engine now updates said variable on run,
and a new function is made available for external statusbars to call (to
avoid dependencies on internal implementation details of ale).

To keep things light, the status bar code is not loaded unless invoked
by the user or an external plugin. On the first load it will update
itself from the global loclist, after that, the engine will handle all
updates.

The external integration function, `ale#statusline#Count()`, will return
a tuple in the format [E, W] (where E is errors, W is warnings), unless
no data exists (ie, the plugin doesn't have a linter for a file or has
not run yet), in which case it returns 0/false.
2016-10-13 08:51:38 -05:00
Bjorn Neergaard 82f38dcd45 Return in the statusline compatibility function, fixing #71 2016-10-11 14:24:43 -05:00
Bjorn Neergaard 93cd44e2ec Match both error and syntax error in verilog 2016-10-11 12:08:31 -05:00
Bjorn Neergaard fc711a0615 Clean and reorganize flags/preferences 2016-10-11 10:02:36 -05:00
Bjorn Neergaard 572c877a69 Default handlers to warning 2016-10-11 09:42:50 -05:00
Bjorn Neergaard c290e2cd60 Remove many redundant handlers 2016-10-11 09:22:47 -05:00
Bjorn Neergaard 1074afbd08 Add new go linters to the help 2016-10-11 08:58:44 -05:00
Bjorn Neergaard ef14a04470 Make HandleUnixFormat Windows-compatible 2016-10-11 08:54:41 -05:00
Bjorn Neergaard 23442a2ec3 Introduce generic unix formatter
Two wrapper functions allow treating lines as errors or as warnings
2016-10-11 08:43:57 -05:00
Bjorn Neergaard 5caec8d3b8 Introduce golang support
This includes go vet, golint, and gofmt -e
2016-10-11 07:56:14 -05:00
Bjorn Neergaard de7e14a484 Enable style checks in Travis 2016-10-11 06:14:28 -05:00
Bjorn Neergaard fb4b797dd2 Use explicit scope in all ale_linters
vint -s is now clean
2016-10-11 06:14:26 -05:00
Bjorn Neergaard ca4badfb3a Use explicit scope in the ale core, as advised by vint -s 2016-10-11 06:14:20 -05:00
Bjorn Neergaard ad2ee80eb6 More randomness in the wrapper tmpfile 2016-10-10 15:53:56 -05:00
Bjorn Neergaard e68800a28d Fixup stdin-wrapper
* Use a more universal shebang.
* Use the template feature of mktemp to avoid silly gymnastics.
2016-10-10 14:31:17 -05:00
Bjorn Neergaard 7f0ce89d2b First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload

First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.

With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.

I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.

The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.

Please let me know what you think!

Closes #59

* Address Travis/Vint errors

For some reason, ale isn't running vint for me...

* Incorporate feedback, make fixes

Lazy-loading logic is much improved.

* Add header comments; remove incorrect workaround

* Remove unneeded plugin guards

* Fix lazy-loading linter logic

Set the wrong variable....

* Fix capitialization
2016-10-10 19:51:29 +01:00