Giter Site home page Giter Site logo

Comments (22)

zdenop avatar zdenop commented on April 28, 2024

Feel free to send PR...

from tesseract.

elfring avatar elfring commented on April 28, 2024

How do you think about to improve static source code analysis also for this software?

from tesseract.

zdenop avatar zdenop commented on April 28, 2024

As you can see on README we use https://lgtm.com and coverity.com for code analysis.

from tesseract.

elfring avatar elfring commented on April 28, 2024

Do these analysis tools point also the open issues out which I reported?

from tesseract.

stweil avatar stweil commented on April 28, 2024

Coverity Scan reports some of those errors – unless they are already fixed. :-)
LGTM does not report the mentioned errors.

  • fseek ⇒ InputBuffer constructor, still buggy, not reported
  • malloc ⇒ SquishedDawg::build_node_map, was fixed some time ago
  • pthread_mutex_init ⇒ CCUtilMutex constructor, still buggy, not reported

Which static code analyser would you suggest to detect such errors?

from tesseract.

elfring avatar elfring commented on April 28, 2024

I suggest to avoid ignorance of return values a bit more.
Would you like to detect every error situation as early as possible?


from tesseract.

stweil avatar stweil commented on April 28, 2024

Sure, but my question was more specific. There is currently a lot of code which does not follow those principles, and more such code could get merged. Without a lot of man power, it is impossible to detect all missing checks of return values. So it is important to have tools which report violations. Do you know such tools?

from tesseract.

stweil avatar stweil commented on April 28, 2024

As there are still some of the mentioned errors not fixed, I reopen this issue.

from tesseract.

elfring avatar elfring commented on April 28, 2024

I know a few higher level development tools which can help here.
Which ones would you dare to integrate into the software build process?

from tesseract.

stweil avatar stweil commented on April 28, 2024

Just tell us the names of those tools, then we can decide.

from tesseract.

elfring avatar elfring commented on April 28, 2024

Examples:

from tesseract.

stweil avatar stweil commented on April 28, 2024

Thank you. I know and used the last two. Coccinelle itself does not find problems – it needs scripts written to do this. Cppcheck did not report missing handling of return values last time when I used it (well, that was some years ago).

from tesseract.

elfring avatar elfring commented on April 28, 2024

Coccinelle itself does not find problems

This software tool can also find and adjust various questionable source code. It supports the C programming language better than C++ so far.

(well, that was some years ago)

I suggest to try Cppcheck out again to see if this analysis tool was improved in desired ways in the meantime.


Would you like to get help from any additional development tools?

from tesseract.

zdenop avatar zdenop commented on April 28, 2024

@elfring : Will you provide output of your code analyze?
Maybe as new issue (grouped by type) so we can close it with commit? Patches are welcomed too ;-)

from tesseract.

elfring avatar elfring commented on April 28, 2024

Will the mentioned tools become relevant for your software development process?

from tesseract.

zdenop avatar zdenop commented on April 28, 2024

@elfring : I am sorry, but I did not get point of your question. Primary build system are autotools. Of course I am interested also in support cmake ...

from tesseract.

elfring avatar elfring commented on April 28, 2024

Did your interest increase for the application of the tool “AspectC++” (together with related information sources for example)?

from tesseract.

zdenop avatar zdenop commented on April 28, 2024

What does it mean practically?
There is basically not intention to extend dependency to another libraries.
Also the main development is done in google, so unless the some approaches are accepted by Ray, it does not make sense to implement it by community...

from tesseract.

stweil avatar stweil commented on April 28, 2024

@elfring, I don't think that Tesseract will switch from C++ to Aspect C++ as that is currently not a common standard. As far as I could see Aspect C++ cannot be used to check the existing code. Nor can Coccinelle because it only supports C but not C++. So only cppcheck remains which can be used in addition to Coverity Scan and LGTM.

The problems with malloc will be addressed by replacing that code with modern C++ data types. See also the planning page in the wiki.

If you have fixes for ignored return values, they are welcome.

from tesseract.

elfring avatar elfring commented on April 28, 2024

As far as I could see Aspect C++ cannot be used to check the existing code.

I suggest to take another look at the provided technology.
Which systematic development methods do you know for the handling of cross-cutting concerns?

Nor can Coccinelle because it only supports C but not C++.

This tool can be useful for limited source code analysis and corresponding transformations.
Would you like to help in any ways to improve the support for the C++ programming language here?

If you have fixes for ignored return values, …

I would prefer the application of available known methodologies.

from tesseract.

zdenop avatar zdenop commented on April 28, 2024

@elfring: any help with improving code is welcomed. Pointing to new tools/methodology is interesting but... we have limited sources and most of active contributors will probably still continue to use what they are familiar.
So if there is problem with code, you can fix, please create new issue/send PR.

from tesseract.

elfring avatar elfring commented on April 28, 2024

It is probably obvious that I am trying for a while to get more software developers familiar also with other helpful methodologies.
🔮 I am curious if their popularity will grow.

from tesseract.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.