Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-09

Code Observer suggestions and bugs

10 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I just discovered the "Code Observer" functionality. Amazing gems in Lazarus - well done guys!

Some suggestions I immediately noticed though after enabling Code Observer.

1) Unnamed Constants. I added some new methods where unnamed constants should be ignore, yet the Code Observer still keeps complaining about those methods. Is this a bug? When do new changes take effect? I have updating set to "idle".

2) Can the "Code Observer" node please remember its state. Every time the treeview refreshes now, the "Code Observer" node closes itself and all child nodes close too. This is very annoying to keep having to open the nodes.

3) Long Procedures - can the line count be added in parentheses - that way I can see which procedures are more important than others in fixing.

4) Unnamed Constants - If I disable unnamed constants in the options, the "Unnamed Constants" node still appears in the Code Observer. It seems the enable/disable option is ignored.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to Aradeonas
Aradeonas wrote
Where can I find it?

hehehe... I struggled with that too. Open the "Code Explorer" window from the View menu. Select the Options button, go to the "Categories" settings and enable "Code Observer". Then in the "Code Observer" settings, set the options you want, like long procedures, many parameters etc. and click OK. The Code Explorer window will now have a new node "Code Observer" that lists any issues it detects.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to Aradeonas
Aradeonas wrote
Thanks but I checked all options and checked many units but there is no "Code Observer" node and Im using last trunk version.

That's another issue I noticed - after my initial email.

In the Code Explorer window, there is a button to the left of the Options button. Click it to switch to "Source view", then the "Code Observer" node will appear right at the bottom of the treeview. As far as I can see, in "Layout view" the "code observer" node is not displayed.

Untested:
If you code is 100% perfect, I don't know if the "Code Observer" node is created or not. I would guess not.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Martin Frb
to Aradeonas
Aradeonas wrote
Still nothing, maybe all of my codes are perfect :D Can you name a fpc or Lazarus unit that shows it?

just a new application project.

TForm1 will be empty, so it gets "empty class section".

You should see the following nodes in code explorer:
- uses
- types
- variables
- code explorer
- surrounding

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: I just discovered the "Code Observer" functionality. Amazing gems in Lazarus - well done…
Show quoted text 11 lines
Hi, I just discovered the "Code Observer" functionality. Amazing gems in Lazarus - well done guys! Some suggestions I immediately noticed though after enabling Code Observer. 1) Unnamed Constants. I added some new methods where unnamed constants should be ignore, yet the Code Observer still keeps complaining about those methods. Is this a bug? When do new changes take effect? I have updating set to "idle".

It works here. And it updates on idle.
Can you give more details?

2) Can the "Code Observer" node please remember its state. Every time the treeview refreshes now, the "Code Observer" node closes itself and all child nodes close too. This is very annoying to keep having to open the nodes.

Fixed.

3) Long Procedures - can the line count be added in parentheses - that way I can see which procedures are more important than others in fixing.

Added.

4) Unnamed Constants - If I disable unnamed constants in the options, the "Unnamed Constants" node still appears in the Code Observer. It seems the enable/disable option is ignored.

Fixed.

Mattias

Reply by email