Hello, 

I'm porting jOOQ-checker to WartRemover that is Scala linter.
I have some suggestions to checker implementations.

1) The following code doesn't compile if SQLDialectChecker is enabled.

@Allow(POSTGRES)
public class AllowPostgres {
    public void doesntCompile() {
        DSL.cube(DSL.inline(1));
    }
}

Error message is "No jOOQ API usage is allowed at current scope due to 
conflicting @Require specification".
This is from these lines:
https://github.com/jOOQ/jOOQ/blob/a8690a2b46a3eb056714f2ab2d14561570d1e8e6/jOOQ-checker/src/main/java/org/jooq/checker/SQLDialectChecker.java#L112-L113

This seems to be unnecessary check.

2) Empty (no-args) @Support means all dialects are supported, right?
So, next two methods have same semantics.

@Support
static void supportEmpty() {
}

@Support({SQL99, DEFAULT, CUBRID, ...And all of other dialect families...})
static void supportAll() {
}

But use these methods in no @Allow scope, then result is different.

void notAllowedAnything() {
    supportEmpty(); // compiles
    supportAll();   // error: No jOOQ API usage is allowed at current 
scope. Use @Allow.
}

This is confusing. I think that both should have same behavior. (both to be 
error is better.)

What do you think?

Regards,
Tsukasa Kitachi

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to