New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check whether R has installed the library lintr #911

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@marsam
Contributor

marsam commented Mar 18, 2016

No description provided.

flycheck.el Outdated
:message (if has-lintr "present" "missing")
:face (if has-lintr 'success '(bold error)))))))
(defun flycheck-R-has-lintr (R)

This comment has been minimized.

@lunaryorn

lunaryorn Mar 18, 2016

Contributor

Please use a lowercase r. I know that the language name is R, but for the sake of consistency I'd like to stick to Emacs Lisp' naming conventions.

This comment has been minimized.

@lunaryorn

lunaryorn Mar 18, 2016

Contributor

Also, please move this function before the syntax checker definition :)

flycheck.el Outdated
"--slave" "--restore" "--no-save" "-e"
"library('lintr')")
(goto-char (point-min))
(not (looking-at-p "Error in library(\"lintr\") : there is no package called ‘lintr’"))))

This comment has been minimized.

@lunaryorn

lunaryorn Mar 18, 2016

Contributor

Are these really smart quotes here? Wouldn't that break on non-UTF-8 locales?

This comment has been minimized.

@marsam

marsam Mar 19, 2016

Contributor

yes they are smart quotes, but can be disabled adding to LC_ALL=C the process-environment

(let ((process-environment (append '("LC_ALL=C") process-environment)))
  ;; ...
  ;; or simply check for "there is no package called"  
  (not (re-search-forward "there is no package called 'lintr'" nil 'no-error)) 
@lunaryorn

This comment has been minimized.

Contributor

lunaryorn commented Mar 18, 2016

@marsam Nice, thank you very much 👍 There are a couple of minor issues which I'd like to ask you ti fix, but other than that it looks good, in my opinion ☺️

@marsam

This comment has been minimized.

Contributor

marsam commented Mar 19, 2016

Hi, I've updated the pull request, tell me if there is more issues

lunaryorn added a commit that referenced this pull request Mar 22, 2016

@lunaryorn lunaryorn closed this in 43569c9 Mar 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment