How to perform static code analysis for OpenWrt?

Hello,
can anyone tell me, how to perform static code analysis for openwrt?
NOTE: I modified some files in openwrt

The question is too broad to answer completely, but what OpenWrt or some of its sub-project uses is either Coverity-Scan or Clang Static Analyzer

1 Like

I've never had success getting any static analysis fixes merged. So beware.

1 Like

Initially I'm getting some bugs, but when I try to check once again by cleaning and using same command[ scan-build make ] to make I did not get any bug. why?

you should not be using scan-build but rather run-clang-tidy