By default, Credo attributes input from STDIN as though it came from a
file named `stdin`. This change passes the buffer's filename, too, so
that Credo can use that information when applying its configuration.
This is a nice improvement because files like `mix.exs` are normally
excluded from Credo-based linting. Previously, ALE would show lint
warnings for those files as they were edited. Now, they are correctly
honor the Credo configuration and don't produce lint output.
* try fixing go build
* cache some system calls
* fix /dev/null
* use chained commands, use `go test -c` instead of `go tool compile`
* fix some unescaped shell commands
* fix a bug with explicitly setting GOPATH
* implement changes requested in code review. handle errors from multiple files. fix issue when starting a new package
* run `go env` as a job
* ensure all functions return the proper type
* fix loclist line numbers in some cases
* remove multibuffer support for now
In my previous change, I updated the Rubocop linter to pass the filename
to Rubocop. This change was tested on a file I expected Rubocop to
ignore and the experience in vim was as I expected. However, I soon
found that ALE wasn't finding errors in files that should not be
ignored. After investigation, I found a few issues that this commit
fixes:
1. We were not properly passing the current filename. We now use
`expand` to get the filename.
2. The regular expression used in the callback was expecting the static
value of `_` for the filename in output. We now use a looser regular
expression that begins matching on the first `:`.
3. The linter was defined statically. By using the current filename when
defining the command the linter would always use the filename of the
first Ruby file the user opened. We now use a `command_callback` to
inject the proper filename.
I tested these changes on a configuration with included and excluded
files and found it to work as I expected. Apologies for the earlier
incorrect change.
When using `--stdin`, Rubocop requires that you also pass the associated
file name. ALE was previously passing `_` as the filename. By passing
the actual relative path to the file and enabling the
`--force-exclusion` option, we can get Rubocop to respect excluded files
in the configuration.
Closes#197
* Add ALEInfo command to get list of available/enabled linters for current filetype
* Add Vader tests for ALEInfo command
* Fix ALEInfo tests breaking CI by echoing too much output to screen
* Speculative change to Makefile which seems to fix test hanging problem locally.
* Fix Vader tests to not require a TTY