norm icon indicating copy to clipboard operation
norm copied to clipboard

Use JGit to filter newly added/modified sql queries only for codegen

Open swanandvk opened this issue 3 years ago • 4 comments

Feature: Add support for generating code for newly added or modified files based on git index.

Existing implementation:

It takes all the sql files provided in the configured directory for code generation.

New Implementation:

  • If no GIT repository is configured in target project then fallback to default behaviour viz. use all sql files for codegen
  • If any untracked file or modified file is available then use only those files for code generation

Advantage:

It does not depend on gradle cache hence the initial run also does not generate code for unintended files.

swanandvk avatar Apr 22 '21 05:04 swanandvk

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Apr 22 '21 05:04 sonarqubecloud[bot]

This is great start. It would be great if you could cover or plan for cases when:

  • [ ] file has a diff (the happy path)
  • [ ] file is new and not in git index yet
  • [ ] file is renamed
  • [ ] file path has changed
  • [ ] file is deleted

kdabir avatar Apr 22 '21 12:04 kdabir

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Jun 07 '21 14:06 sonarqubecloud[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Sep 06 '21 11:09 sonarqubecloud[bot]