WIP: Add SQFLint to Travis#5468
Conversation
|
Is there no way to run for only the changed files? |
|
@silentspike As said in OP:
So yes, there is a way by diffing and pulling out file name extensions, have done it before. Problem is when some non-SQF file might impact building success when compiling, but for a linter like this that can't happen. |
|
I meant more, it looks like it's running for the entire addons folder: |
|
Ah, yes, good idea! |
|
Let me know if you need help here. I can modify SQFLint so that it works well here. |
|
@LordGolias Right now it crashes as seen here. |
|
You are right. I just pushed a fix of that to master of sqf. I also updated the pip version so that you can install the latest using pip install. I checked that the ACE addons is analysed without any further crash. |
|
@LordGolias Very nice! Travis ran to the end now. Next step is making it return an error code instead. I am not sure this should be configurable somehow as some might not want warnings reported as errors. |
|
@silentspike We might still want to run full lint on merges into master, just to identify anything that may get through in whatever way, maybe? |
|
I think it would be unnecessary unless the linter is updated in a way that it cross-examines function calls for return value types or something. Might not be a bad idea to run it fully for release branch though? |
|
Why not run it for every file? Does the linting take a long time to complete? |
|
Nah not necessarily, not sure how it would scale if being run for every commit though. I'm committing the sin of premature optimization 😆 |
|
I recommend:
Full lint does take a bit, we have A LOT of files. |
|
But is it an issue? How long does a full lint take? We almost never merge anything straight away. Just lint everything is my suggestion. |
|
|
I'd just run the full lint. We almost never merge anything that fast anyway. |
When merged this pull request will:
Todo:
.sqffiles