Replacement of EBN
Closed, ResolvedPublic

Description

Attached is a list of every test EBN currently performs.

Intention is to go through and work out:

  • which exist in other tools (and if so what is the tool)
  • what remains that's still relevant

What things exist in EBN and what replacements are there

API Documentation Warnings

Check for undocumented methods.
Check for methods with undocumented return types
Check for undocumented parameters
Check for unknown parameters
Check for methods that are undeclared or undefined
Check for bad doxygen commands
Check for bad references
Check for mismatched class members
Check for mismatched file members
Check for members without names
Check for bad tags
Check for bad links
Check for bad blocks
Check for bad lists
Check for bad tokens
Check for undocumented functions
Check for undocumented defines
Check for internal inconsistencies
Check for missing @endif
Check for bad argument in a @class, @struct, or @union statement
Check for bad @copydoc
Check for bad @copybrief/copydoc
Check for DOT_GRAPH_MAX_NODES too low
Check for improper comment nesting
Check for errors of dubious value
Check for using a section label more than once
Check for bad use of the @dir command
Check for Unknown errors

Docbook Validation Checker

Checking for well-formed XML
Checking for proper DOCTYPE declaration
Scanning for multiple root elements
Looking for proper translator markers
Verifying that preferred words of phrases were used
Testing for applicable entities
Checking for invalid image references

Source Code Checker

For File Type cmake
Check that file ends with a newline [endswithnewline]
Check for problems with filenames [filenames]
Check for spelling errors [spelling]

For File Type messages
Check for appending to rc.cpp [rcappend]

For File Type c++
Check for TRUE and FALSE macros [captruefalse]
Check for methods that return 'const' refs in public classes [constref]
Check for an acceptable copyright [copyright]

  • handled by licensecheck

Check for cpp macros and usage [cpp]
Check for code that should be considered crashy. [crashy]
Check single-char QString operations for efficiency [doublequote_chars]
Check for unwanted doxygen tags in major versions [doxytags]
Check public classes with private members or d-pointer issues [dpointer]

  • sandro had an ABI checker?

Check for QString compares to "" [emptystrcompare]
Check that file ends with a newline [endswithnewline]
Check for C++ ctors that should be declared 'explicit' [explicit]
Check for problems with filenames [filenames]
Check for foreach loop issues [foreach]

  • foreach is being phased out

Check validity of i18n calls [i18ncheckarg]
Check for invalid icon names [iconnames]
Check for proper include directives [includes]
Check for inline methods in public classes [inline]
Check for an acceptable license [license]
Check for normalized SIGNAL and SLOT signatures [normalize]

  • clazy does this (also new syntax exists)

Check for assignments to QString::null or QString() [nullstrassign]
Check for compares to QString::null or QString() [nullstrcompare]
Check for C++ operators that should be 'const' [operators]
Check for inappropriate pass-by-value function args [passbyvalue]
Check for postfix usage of ++ and -- [postfixop]
Check for dangerous or inefficient QByteArray usage [qbytearray]
Check for Qt classes that should not be used [qclasses]
Check for Qt methods that should be avoided [qmethods]
Check for QMIN and QMAX macros [qminmax]
Check for classes that should use the 'Q_OBJECT' macro [qobject]

  • Qt now warns a lot better

Check for signals: and slots: [sigsandslots]

  • new syntax exists

Check for spelling errors [spelling]
Check for improperly initialized global static objects [staticobjects]
Check for strings used improperly or should be i18n. [strings]
Check for system calls to replace by KDE or Qt equivalents [syscalls]
Check for typedefs that should be replaced by Qt typedefs [typedefs]

For File Type designer

Check that file ends with a newline [endswithnewline]
Check for problems with filenames [filenames]
Check for files that need to be fixed by 'fixuifiles' [fixuifiles]
Check validity of i18n calls [i18ncheckarg]
Check for Qt classes that should not be used [qclasses]
Check for spelling errors [spelling]

For File Type qml
Check for an acceptable copyright [copyright]

  • handled by tool "licensecheck"

Check that file ends with a newline [endswithnewline]

  • who cares?

Check for problems with filenames [filenames]

Check for invalid icon names [iconnames]
Check for an acceptable license [license]
Check for syntax errors in QML code [qmlsyntax]

  • does it mean qmllint? We can add that as a cmake step maybe?

Check for spelling errors [spelling]

  • We need more info on how this works, but a tool run by scripty would probably be more useful?
Restricted Application added a subscriber: sysadmin. · View Herald TranscriptNov 10 2019, 4:36 PM
davidedmundson updated the task description. (Show Details)

Check for system calls to replace by KDE or Qt equivalents [syscalls]

This false positives for strings or comments containing something that looks like a system function. I would be willing to port this clazy for better detection.

At least doublequote_chars, passbyvalue, qobject and staticobjects C++ checks are covered by clazy too; foreach and QString::null will go away with Qt6.
The API docs warnings I assume are taken from the doxygen output I guess?

With the transition of api.kde.org to new systems, what are people's thoughts on this?

I'm thinking that this would probably be better suited as a job people could add (and customise the behaviour of) within Gitlab CI rather than a dedicate website (that way we also ensure we only run when there are changes as well).

bcooksley closed this task as Resolved.May 7 2022, 12:14 AM
bcooksley claimed this task.

Following discussion on IRC it would appear that any replacement of this would be best done:
a) Utilising Gitlab CI and the other services offered by Gitlab itself (such as CodeClimate report parsing)
b) By using modern tools such as reuse/clazy/clang-tidy/etc

I'm therefore going to close this for now as these should be discussed in separate tickets where Sysadmin assistance is needed.
Merge Requests to sysadmin/ci-utilities are welcome for those looking to add functionality here.

Please note that if the checker you are looking to integrate needs to compile or do anything along those lines (ie. it isn't a static analyser like cppcheck/reuse) then please discuss with us in advance as it is probably better to integrate that as part of one of the existing Linux/FreeBSD CI flows rather than repeating the work (and wasting CPU cycles).