Skip to content
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

"file" Option Broken in Config #351

Closed
AntumDeluge opened this issue May 10, 2021 · 3 comments · Fixed by #356
Closed

"file" Option Broken in Config #351

AntumDeluge opened this issue May 10, 2021 · 3 comments · Fixed by #356

Comments

@AntumDeluge
Copy link
Contributor

Just curious why I'm getting the following output:

c:\games\minetest\mods\mineral\init.lua:34: no module() call found; no initial doc comment
c:\games\minetest\mods\mineral\items.lua:52: no module() call found; no initial doc comment
c:\games\minetest\mods\mineral\nodes.lua:27: no module() call found; no initial doc comment
c:\games\minetest\mods\mineral\ores.lua:46: no module() call found; no initial doc comment

Here are the settings in config.ld:

title = "Minerals for Minetest"
project = "minerals"
format = "markdown"
not_luadoc = true
boilerplate = false
icon = "icon.png"

file = {"settings.lua", "api.lua",}

I am invoking it like this:

ldoc -c "C:\Games\Minetest\mods\mineral\docs\config.ld" -d "C:\Games\Minetest\mods\mineral\docs" \
  -o "api" "C:\Games\Minetest\mods\mineral"

My understanding is that it should only be parsing the files settings.lua & api.lua.

@AntumDeluge
Copy link
Contributor Author

Only appears to be an issue with file variable within the config. Setting file using command line parameter works fine.

@AntumDeluge AntumDeluge changed the title LDoc Trying to Parse Files not Listed in "file" Parameter "file" Option Broken in Config Jul 12, 2021
@AntumDeluge
Copy link
Contributor Author

I believe this may be partially due to the fact that the file argument is required in the command line. So file is never used from the config.

AntumDeluge added a commit to AntumDeluge/LDoc that referenced this issue Jul 12, 2021
Fixes issue with ldoc.file not being used when args.file is directory other than ".".

Reference: lunarmodules#351
This was referenced Jul 12, 2021
@AntumDeluge
Copy link
Contributor Author

It turns out that my issue is that LDoc only recognizes file from the config if the file command line parameter is .. I created a pull request to fix this: #356

Related: #279

greg-el added a commit to snowplow/snowplow-lua-tracker that referenced this issue Apr 12, 2022
There is currently a bug with `file` in LDoc, where LDoc will only recognise the `file` if the directory arg is `.`
lunarmodules/ldoc#351

This means cd'ing into `./src` is required to exclude files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant