How to keep mapping between the files in sonarqube

Is it possible to keep a mapping between the files in Sonarqube

suppose you have a file foo.c:

mydir/foo.c
we convert it to bindir/mydir_bbb/foo.T
we compile bindir/mydir_bbb/foo.T to bindir/mydir_bbb/foo.o
Is it possible to keep mapping bindir/mydir_bbb/foo.T to mydir/foo.c ?

Thanks in Advance,
Mani

Hi Mani,

I guess you want SonarQube to understand that mydir/foo.c is the same file as binddir/mydir_bbb/foo.T?

Analysis does understand moving files within a project. Specifically, our file-move detection is aimed at making sure that the issues raised on the old file name/location move along with the file. So rather than being closed on foo.c, and re-opened as brand new issues on binddir/mydir_bbb/foo.T - thus losing all comments, FPs &etc - the old issues stay open.

So what you’ve described should ‘just work’ assuming that *.T files are also analyzed as C code. But if you renamed foo.c to foo.html, then the C analysis would no longer run on the file and the file’s old C issues would be closed, and new, HTML issues would be opened instead.

 
HTH,
Ann

Hi Ann, Yes

Hi,

Then it should just work, assuming that you’ve configured .T to be a C language extension.

 
Ann

Thanks Ann