Closed joao-vitor-souza closed 1 year ago
The linter ends all comments with a space `, this is a flag indicating that the comment were already checked. If you don't want the linter to check a comment, just add
` at the end of it.
Wow! Great stuff! Looks really good! Only thing I'v noticed: the auto-generated files like the Config.lua should not be checked or we should create the file with the spaces in it. What would you suggest? Everything else looks fine! I think really only the Config.lua is missing. So lets just add the spaces in the generation of it?
Wow! Great stuff! Looks really good! Only thing I'v noticed: the auto-generated files like the Config.lua should not be checked or we should create the file with the spaces in it. What would you suggest? Everything else looks fine! I think really only the Config.lua is missing. So lets just add the spaces in the generation of it?
Yep, I noticed that, I'll fix the generation of it.
Seems like some coments just get deleted when I run the script on windows. Could be related to the encoding? In the latest dev-commit i lose some lines in pathSwithcer.lua for example:
Seems like some coments just get deleted when I run the script on windows. Could be related to the encoding? In the latest dev-commit i lose some lines in pathSwithcer.lua for example:
Weird, will find out and commit the changes.
No hurry at all. It seems to only happen on windows or on my system. Can investigate this also myself a little more tomorrow evening. Just noticed it after I run the script again on my merged files...
No hurry at all. It seems to only happen on windows or on my system. Can investigate this also myself a little more tomorrow evening. Just noticed it after I run the script again on my merged files...
Found the error, I forgot to append a line when no correction was returned from the API, I continue
to the next line instead appending it the way it is first. Now it's fixed!
except IndexError:
out_file_lines.append(line)
continue
Ah makes sense. So did we lose some comments then with the first merge? Will go through them this evening. Thanks for fixing it!
Ah makes sense. So did we lose some comments then with the first merge? Will go through them this evening. Thanks for fixing it!
Nope, I manually checked every single line before the first merge and restore those that were deleted (a few of them). If you'd run it before, it'd delete them again (as you did). Not any more.
Hey, are you online on discord? The change with the settings-definition is not that good in my opinion. Let us discuss that there?
Guys, I built a comment "linter" for Lua files. You need to run
fun-bots-helper.py
to acess it, it's theFix Grammar
button:Pressing this button, all¹ Lua files will be scanned and their comments (everything after
--
²) will be formatted and grammarly checked. For Instance, if there is this comment:The linter post request an API and give this result:
It still has some flaws, but this is the first version. Certainly it will help to standardize future code documentations.
I already scanned and reviewed all files, the results were commited here.
Also, I found some comments saying that something is unused or should be removed, maybe it's worth taking a look at them:
¹
SettingsDefinition.lua
,Config.lua
andext/Shared/Languages
gave weird results, so I checked them manually. Next scans won't search for them. ² Multiple line comments (--[[]]
) are not working yet.