bavc / qctools

QCTools (Quality Control Tools for Video Preservation) is a free and open source software tool that helps users analyze and understand their digitized video files through use of audiovisual analytics and filtering. QCTools is funded by the National Endowment for the Humanities and the Knight Foundation, and is developed by the Bay Area Video Coalition.
http://www.bavc.org/qctools
Other
314 stars 41 forks source link

Code style #533

Open richardpl opened 6 years ago

richardpl commented 6 years ago

Can this be fixed at all?

Mixed tabs and spaces & mixed indentations are worst offenders.

dericed commented 6 years ago

+1

retokromer commented 6 years ago

+1

ablwr commented 6 years ago

Preference for existing styleguide or (even better) linter?

dericed commented 6 years ago

https://www.ffmpeg.org/developer.html#Code-formatting-conventions

retokromer commented 6 years ago

FFmpeg is a good example indeed! (The only detail I don’t like is indent 4, because 2 is fully sufficient in my opinion.)

ElderOrb commented 6 years ago

This is not only about tabs vs spaces. Currently QCTools uses mix of multiple naming conventions for functions/classes. Fixing all this looks like pretty big task. But after doing it right, code checker could probably be integrated into Travis to early notify about all the violations.

retokromer commented 6 years ago

Fixing all this looks like pretty big task.

Indeed, yet a good code editor helps a lot.

ElderOrb commented 6 years ago

As for the code conventions, I would suggest to follow the ones from Qt. I don't mind ffmpeg's ones but QCTools is Qt-based C++ application after all.

https://wiki.qt.io/Qt_Coding_Style https://wiki.qt.io/Coding_Conventions

richardpl commented 6 years ago

No point in doing it manually if job can be automated. I propose to run it under indent -kr -nut to fix issues and also to remove trailing spaces and tabs.

ablwr commented 6 years ago

+1 +1 +1

retokromer commented 6 years ago

No point in doing it manually if job can be automated.

Of course not! I personally use BBEdit since years, which does this.

richardpl commented 5 years ago

So, anything gonna happen anytime soon? Or I need to do it?

ablwr commented 5 years ago

Be the change you want to see in the world, @richardpl