Avast does not detect viruses in files. RAR?
Doesn’t look into rar files by default, but it will find it when you go to extract it… I assume to avoid the CPU penalty associated with unpacking the archive files.
If you want to adjust this you can go to file system shield settings, under packers, and then place a check next to the additional formats you want to “deep” scan.