SoftwareQuTech / SimulaQron

Quantum Network Simulator for Application Programming
Other
112 stars 53 forks source link

Static Code Analysis #268

Open Bugman-creator opened 3 years ago

Bugman-creator commented 3 years ago

This is for a class project. A Static Code Analysis Tool was run on your project and filtered to only include correct findings Please find attached the file containing the errors. This file includes the error type, as well as the files and lines where the errors occur

simulaqronSCAResults.txt

AckslD commented 3 years ago

Thanks for pointing this out! The issues pointed out is the use of eval. Two occurrences of this are very easy to fix by making use of ast.literal_eval. However, we also make use of this to evaluate the name of a class as a string to the actual class. Not sure directly how to do this in general without using eval. It should be stated that these calls to eval do not use strings coming from a user so should not be a problem as far as I can tell.