Custom PMD Apex rules Query


could you help me with answer to this question from sonar perspective? what will be the ideal solution for this? adding custom pmd rules in sonarlint and having it directly consumed by sonar sever in connected mode? (is this achievable? if yes can u share the steps) or having the report file generated and make the sonarqube consume the report file using extra properties in pipeline task?

Link to question:

Duplicates How to integrate custom Apex rules (PMD)