Comments (22)
Feel free to send PR...
from tesseract.
How do you think about to improve static source code analysis also for this software?
from tesseract.
As you can see on README we use https://lgtm.com and coverity.com for code analysis.
from tesseract.
Do these analysis tools point also the open issues out which I reported?
from tesseract.
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.
I suggest to avoid ignorance of return values a bit more.
Would you like to detect every error situation as early as possible?
- Are you interested to apply aspect-oriented software development?
- Would you like to encapsulate error detection and corresponding exception handling as a reusable aspect in this software?
from tesseract.
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.
As there are still some of the mentioned errors not fixed, I reopen this issue.
from tesseract.
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.
Just tell us the names of those tools, then we can decide.
from tesseract.
Examples:
from tesseract.
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.
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.
@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.
Will the mentioned tools become relevant for your software development process?
from tesseract.
@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.
Did your interest increase for the application of the tool “AspectC++” (together with related information sources for example)?
from tesseract.
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.
@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.
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.
@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.
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)
- Tesseract fails to OCR text with very clear hexadecimal digits HOT 5
- Two little bugs for tesseract HOT 1
- multithreaded tesseract causes Linux crash HOT 5
- Linker Error for tesseract53.lib HOT 1
- Add redirect function HOT 1
- Add ICD Codes in english trained Data HOT 2
- Some CI jobs (GitHub Actions) are failing HOT 10
- uuencode-generated text is OCRed with many mistakes HOT 2
- Error! The command "tesseract" was not found. HOT 2
- Error! The command "tesseract" was not found
- unicharset_extractor segfault HOT 31
- Please add the API call to translate the language code to the full language name HOT 3
- Warning: LSTMTrainer deserialized an LSTMRecognizer! Error, data/eng/eng_num_vert.lstm is an integer (fast) model, cannot continue training HOT 7
- Add the NN for a 'random' ASCII language HOT 1
- "min_characters_to_try" parameter does not work HOT 2
- phonetic symbols and special characters HOT 1
- inform where we can find tesseract.exe HOT 1
- Native Crash in otsuthr.cpp HOT 2
- CI: vcpkg failure due to missing xz tarball HOT 4
- link error LNK1120 with text2image.exe
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tesseract.