Skip to content

Resolved all warning from Lua Diagnostic and added some missing typings - #1200

Closed
MuDzYNN wants to merge 1 commit into
qbcore-fivem:v2.0from
MuDzYNN:v2.0
Closed

Resolved all warning from Lua Diagnostic and added some missing typings#1200
MuDzYNN wants to merge 1 commit into
qbcore-fivem:v2.0from
MuDzYNN:v2.0

Conversation

@MuDzYNN

@MuDzYNN MuDzYNN commented Jul 29, 2025

Copy link
Copy Markdown

Description

Basically it won't change any functionality. I just fixed all of warnings that comes from Lua Diagnostic extension. Additionally I added some missing typing for function from QBCore.Functions object.

Checklist

  • I have personally loaded this code into an updated qbcore project and checked all of its functionality.
  • My code fits the style guidelines.
  • My PR fits the contribution guidelines.

@ChristianBDev

Copy link
Copy Markdown
Contributor

Personally a waste of a PR, most of what you changed is the same output but the first change at the top, why define coords when only calling it 3 times when you can keep it how it is in the first place?

@MuDzYNN

MuDzYNN commented Jul 30, 2025

Copy link
Copy Markdown
Author

Yeah I know, that's why I'm wrote that this don't change any functionality. It's simply better to work in a project that doesn't have unnecessary warnings. About defining coords - I also do that to resolve warning about missing parameters, because CreateVehicle requires 7 arguments and only received 5.

@Z3rio

Z3rio commented Jul 30, 2025

Copy link
Copy Markdown
Contributor

Personally a waste of a PR, most of what you changed is the same output but the first change at the top, why define coords when only calling it 3 times when you can keep it how it is in the first place?

I dont really understand this take, especially why its so harsh. Ofcourse this provides value? And its obvious someone put down time and effort to make this....

Opening up a project/resource and seeing a bunch of warnings, most of which arent even "real", isnt ideal. As it defers us from real warnings.
Same with having a (permanently) failing lint test, that just makes this repo look bad (constantly having the red cross), and the code being formatted incorrectly, documented/typed incorrectly and such provides a much worse developer experience.

Furthermore, I do actually believe some of these changes are required, as FiveM started forcing lua 5.4 which is much more strict with the return & input values. (Such as using true instead of 1, etc)

@Z3rio Z3rio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good when reading through it, have not tested this ingame or in my editor, though.

@github-actions

Copy link
Copy Markdown

This PR has had 60 days of inactivity & will close within 7 days

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants