Unless you're using the Maven plugin, Sonar will not understand how to compile your code, so it's up to you to ensure that sonar is run against fresh binaries.
It's Findbugs that requires access to the compiled class files and dependency jars, in order to complete it's analysis.