-
Notifications
You must be signed in to change notification settings - Fork 320
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
luacheck requires a real path to a directory? #208
Comments
I also found that even if I pass the real path, but the current working directory is different, the files are missed: $ pwd
/home/alex/tmp/test-luacheck
$ mkdir ccc
$ cd ccc
$ luacheck --config ../aaa/.luacheckrc /home/alex/tmp/test-luacheck/aaa
Total: 0 warnings / 0 errors in 0 files |
Totktonada
added a commit
to tarantool/tarantool
that referenced
this issue
Nov 11, 2020
Now `make luacheck` gracefully handles different cases: in-source and out-of-source build (within the source tree or outside), current working directory as a real path or with symlink components. As result of looking into those problems I filed the issue [1] against luacheck. It seems, there are problems around absolute paths with symlinks components. [1]: mpeterv/luacheck#208
Totktonada
added a commit
to tarantool/tarantool
that referenced
this issue
Dec 1, 2020
Now `make luacheck` gracefully handles different cases: in-source and out-of-source build (within the source tree or outside), current working directory as a real path or with symlink components. As result of looking into those problems I filed the issue [1] against luacheck. It seems, there are problems around absolute paths with symlinks components. [1]: mpeterv/luacheck#208
I suggest to resolve specified path using
|
@ligurio It seems it works only when .luacheckrc can be found by upward directories traversal. See #208 (comment). |
ligurio
pushed a commit
to tarantool/tarantool
that referenced
this issue
Dec 16, 2020
Now `make luacheck` gracefully handles different cases: in-source and out-of-source build (within the source tree or outside), current working directory as a real path or with symlink components. As result of looking into those problems I filed the issue [1] against luacheck. It seems, there are problems around absolute paths with symlinks components. [1]: mpeterv/luacheck#208
Totktonada
added a commit
to tarantool/tarantool
that referenced
this issue
Feb 18, 2021
Now `make luacheck` gracefully handles different cases: in-source and out-of-source build (within the source tree or outside), current working directory as a real path or with symlink components. As result of looking into those problems I filed the issue [1] against luacheck. It seems, there are problems around absolute paths with symlinks components. [1]: mpeterv/luacheck#208
Totktonada
added a commit
to tarantool/tarantool
that referenced
this issue
Mar 5, 2021
Now `make luacheck` gracefully handles different cases[^1]: in-source and out-of-source build (within the source tree or outside), current working directory as a real path or with symlink components. As result of looking into those problems I filed the issue [1] against luacheck. It seems, there are problems around absolute paths with symlinks components. [^1]: We have the similar problems with LuaJIT's luacheck rule. They will be fixed in a separate patch. [1]: mpeterv/luacheck#208 Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org> Reviewed-by: Igor Munkin <imun@tarantool.org>
Totktonada
added a commit
to tarantool/tarantool
that referenced
this issue
Mar 5, 2021
Now `make luacheck` gracefully handles different cases[^1]: in-source and out-of-source build (within the source tree or outside), current working directory as a real path or with symlink components. As result of looking into those problems I filed the issue [1] against luacheck. It seems, there are problems around absolute paths with symlinks components. [^1]: We have the similar problems with LuaJIT's luacheck rule. They will be fixed in a separate patch. [1]: mpeterv/luacheck#208 Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org> Reviewed-by: Igor Munkin <imun@tarantool.org>
Totktonada
added a commit
to tarantool/tarantool
that referenced
this issue
Mar 5, 2021
Now `make luacheck` gracefully handles different cases[^1]: in-source and out-of-source build (within the source tree or outside), current working directory as a real path or with symlink components. As result of looking into those problems I filed the issue [1] against luacheck. It seems, there are problems around absolute paths with symlinks components. [^1]: We have the similar problems with LuaJIT's luacheck rule. They will be fixed in a separate patch. [1]: mpeterv/luacheck#208 Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org> Reviewed-by: Igor Munkin <imun@tarantool.org> (cherry picked from commit af44846)
Totktonada
added a commit
to tarantool/tarantool
that referenced
this issue
Mar 5, 2021
Now `make luacheck` gracefully handles different cases[^1]: in-source and out-of-source build (within the source tree or outside), current working directory as a real path or with symlink components. As result of looking into those problems I filed the issue [1] against luacheck. It seems, there are problems around absolute paths with symlinks components. [^1]: We have the similar problems with LuaJIT's luacheck rule. They will be fixed in a separate patch. [1]: mpeterv/luacheck#208 Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org> Reviewed-by: Igor Munkin <imun@tarantool.org> (cherry picked from commit af44846)
igormunkin
added a commit
to tarantool/luajit
that referenced
this issue
Mar 5, 2021
Unfortunately, luacheck doesn't handle the working directory or one used in options if it is not a real path. As a result of this patch both PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are resolved prior to be used within luacheck target custom command. The issue has been already fixed in Tarantool repo after applying af448464d15f60b87f1c9ef41a7816911c889459 ('tools: fix luacheck invocation in different cases'), and this patch is necessary, since <LuaJIT-luacheck> is the dependency for Tarantool <luacheck> target. Relates to mpeterv/luacheck#208 Reported-by: Alexander Turenko <alexander.turenko@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org>
igormunkin
added a commit
to tarantool/luajit
that referenced
this issue
Mar 5, 2021
Unfortunately, luacheck doesn't handle the working directory or one used in options if it is not a real path. As a result of this patch both PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are resolved prior to be used within luacheck target custom command. The issue has been already fixed in Tarantool repo after applying af448464d15f60b87f1c9ef41a7816911c889459 ('tools: fix luacheck invocation in different cases'), and this patch is necessary, since <LuaJIT-luacheck> is the dependency for Tarantool <luacheck> target. Relates to mpeterv/luacheck#208 Reported-by: Alexander Turenko <alexander.turenko@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org>
igormunkin
added a commit
to tarantool/luajit
that referenced
this issue
Mar 9, 2021
Unfortunately, luacheck doesn't handle the working directory or one used in options if it is not a real path. As a result of this patch both PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are resolved prior to be used within luacheck target custom command. The issue has been already fixed in Tarantool repo after applying af448464d15f60b87f1c9ef41a7816911c889459 ('tools: fix luacheck invocation in different cases'), and this patch is necessary, since <LuaJIT-luacheck> is a dependency for Tarantool <luacheck> target. Relates to mpeterv/luacheck#208 Reported-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Sergey Kaplun <skaplun@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org>
igormunkin
added a commit
to tarantool/luajit
that referenced
this issue
Mar 10, 2021
Unfortunately, luacheck doesn't handle the working directory or one used in options if it is not a real path. As a result of this patch both PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are resolved prior to be used within luacheck target custom command. The issue has been already fixed in Tarantool repo after applying af448464d15f60b87f1c9ef41a7816911c889459 ('tools: fix luacheck invocation in different cases'), and this patch is necessary, since <LuaJIT-luacheck> is a dependency for Tarantool <luacheck> target. Relates to mpeterv/luacheck#208 Reported-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Sergey Kaplun <skaplun@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org> (cherry picked from commit 00f82a6)
igormunkin
added a commit
to tarantool/luajit
that referenced
this issue
Mar 10, 2021
Unfortunately, luacheck doesn't handle the working directory or one used in options if it is not a real path. As a result of this patch both PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are resolved prior to be used within luacheck target custom command. The issue has been already fixed in Tarantool repo after applying af448464d15f60b87f1c9ef41a7816911c889459 ('tools: fix luacheck invocation in different cases'), and this patch is necessary, since <LuaJIT-luacheck> is a dependency for Tarantool <luacheck> target. Relates to mpeterv/luacheck#208 Reported-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Sergey Kaplun <skaplun@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org> (cherry picked from commit 00f82a6)
igormunkin
added a commit
to tarantool/luajit
that referenced
this issue
Mar 10, 2021
Unfortunately, luacheck doesn't handle the working directory or one used in options if it is not a real path. As a result of this patch both PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are resolved prior to be used within luacheck target custom command. The issue has been already fixed in Tarantool repo after applying af448464d15f60b87f1c9ef41a7816911c889459 ('tools: fix luacheck invocation in different cases'), and this patch is necessary, since <LuaJIT-luacheck> is a dependency for Tarantool <luacheck> target. Relates to mpeterv/luacheck#208 Reported-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Sergey Kaplun <skaplun@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org> (cherry picked from commit 00f82a6)
igormunkin
added a commit
to tarantool/luajit
that referenced
this issue
Mar 10, 2021
Unfortunately, luacheck doesn't handle the working directory or one used in options if it is not a real path. As a result of this patch both PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are resolved prior to be used within luacheck target custom command. The issue has been already fixed in Tarantool repo after applying af448464d15f60b87f1c9ef41a7816911c889459 ('tools: fix luacheck invocation in different cases'), and this patch is necessary, since <LuaJIT-luacheck> is a dependency for Tarantool <luacheck> target. Relates to mpeterv/luacheck#208 Reported-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Sergey Kaplun <skaplun@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org>
igormunkin
added a commit
to tarantool/luajit
that referenced
this issue
Jun 16, 2022
Unfortunately, luacheck doesn't handle the working directory or one used in options if it is not a real path. As a result of this patch both PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are resolved prior to be used within luacheck target custom command. The issue has been already fixed in Tarantool repo after applying af448464d15f60b87f1c9ef41a7816911c889459 ('tools: fix luacheck invocation in different cases'), and this patch is necessary, since <LuaJIT-luacheck> is a dependency for Tarantool <luacheck> target. Relates to mpeterv/luacheck#208 Reported-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Sergey Kaplun <skaplun@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org>
igormunkin
added a commit
to tarantool/luajit
that referenced
this issue
Jun 16, 2022
Unfortunately, luacheck doesn't handle the working directory or one used in options if it is not a real path. As a result of this patch both PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are resolved prior to be used within luacheck target custom command. The issue has been already fixed in Tarantool repo after applying af448464d15f60b87f1c9ef41a7816911c889459 ('tools: fix luacheck invocation in different cases'), and this patch is necessary, since <LuaJIT-luacheck> is a dependency for Tarantool <luacheck> target. Relates to mpeterv/luacheck#208 Reported-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org> Reviewed-by: Sergey Kaplun <skaplun@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found that under the following circumstances I need to pass a real directory path (with resolved symlinks) to the luacheck executable in order to don't miss warnings:
.luacheckrc
in a project root haveinclude_files
with some globs.How to reproduce:
I step into this problem, because I use symlinks to ease access to directories that I use often. I'm not sure this is broad approach, but I hope it is valid. At least, it seems, it does not contradict with the current luacheck documentation.
(I'm aware about the status of the repository, but I think that issues should be filed here until the repository will be properly migrated: otherwise we'll have several issue numerations.)
The text was updated successfully, but these errors were encountered: