Toad World® Forums

6.2 beta Formatter problems


#1

Hello

From the release notes I was not expecting changes in the formatter but I found out in the first try the following:

  • The default format is not very readable (I suggest that the default should be more readable)

  • the header appear bellow the code (It’s a footer :slight_smile: ) and the advises are displayed after that (with some strange line numbers order/repetition)
    /* Formatted on 20-Fev-2009 0:02:23 (QP5 v5.120) */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(57): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(60): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(65): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(68): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */
    /*ADVICE(54): This item has not been declared, or it refers to a label [131] */

  • disabling the header the advices are displayed in the right location (and only one advice appear for line 54 but several others appear for the lines before)

Filipe Silva


#2

Hi Filipe,

Could you please provide us with the script you were using?

Gwen


#3

Hi Filipe,

Thanks for the quick feedback.

First, we did make change in the formatter. In the release notes they would be:
Inline Advice rule 106 was placed incorrectly before a pair of single quotes finish
Append the header at the top when formatting code

The details and related changes are:
Advice rule 106 will be inserted after the whole literal text in a new line;
Header tagline has been moved back to first line for sql scripts;
Header tagline will be inserted into the line after object name when formatting the contents of an object which is open in Code Editor;
Advice line number points to the exact line where the rule fires;
The version number in header tagline is shorten to two sections from 4 sections;

Regarding the issues you found:

  1. We didn’t make changes to the default options since 6.1. Could you provide the case you came across? No matter it’s broken from 6.1 or it’s an issue for both, we can make changes to the default options as long as it can be more reasonable.
  2. Could you provide the script that caused the problems? For both the header and the advice line numbers.
  3. Script too.

Thanks
Vincent


#4

I didn’t answer before because I could not reproduce that in the following day and ever since.

sorry

Filipe


#5

That’s ok Filipe. We’re always glad to know the issue is not there any more :slight_smile:


#6

Hi

I got this advice that is wrong!

SELECT d.dummy, d1.dummy, NULL
/*ADVICE(1): Elements in the SELECT list (either columns or expressions)
are not qualified by a table/view name [403] */
FROM DUAL d, DUAL d1
WHERE d1.dummy = d.dummy

The reason for the advice is that NULL doesn’t have a qualified table name :slight_smile:

Regards

Filipe


#7

Hi Filipe,

Thanks for pointing this out. I agree with you that NULL should not trigger this advice rule. I will log CR for this.

Vincent