CERT Java with MPS

I am trying to add CERT Java Coding guidelines to existing Java. That time I got JetBrains MPS. I tried most of the documents available in JetBrains site. But those are not sufficient for my work(I am totally new with MPS). Two doubts are can I implement CERT Java Coding guidelines using MPS and if possible, how to start my work ?? (Example in one CERT rule says Create files with appropriate access permissions. So if one person adds Writer out = new FileWriter("file"); then my system has to add the permission checking block dynamically.)

1 comment

Hi Rahul,

this to me looks like a task for static code analysis, which is definitely doable in MPS. You can either employ checking rules of the type-system and quick-fixes to have the code altered in the editor, or perform your code changes during generation, so that only the generated code contains the checking constructs.

Vaclav

 

1

Please sign in to leave a comment.