taskLiberty Eiffel - Tasks: task #13859, warning in case an inspect doesn't...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #13859: warning in case an inspect doesn't have an else clause

Submitter:  Raphael Mack <ramack>
Submitted:  Tue 05 Jan 2016 10:22:08 PM UTC
   
 
Should Start On:  Mon 04 Jan 2016 11:00:00 PM UTC Should be Finished on:  Mon 04 Jan 2016 11:00:00 PM UTC
Category:  None Priority:  5 - Normal
Status:  None Assigned to:  None
Percent Complete:  0% Open/Closed:  Open
Fixed Release:  None Planned Release:  dennis
Effort:  0.00

Sat 22 Sep 2018 07:45:34 PM UTC, comment #2: 

The inspect without else is fully correct, yes. But even in C static code checkers often recommend to have a default label in a switch-case block.

So I personally think it would be nice to get a warning, as I want to always write the else in an inspect - even if it is empty. But definitely we should think of a mode without that warning. I anyhow could imagine, that sooner or later we want to have an "ecma-mode" which might allow more (in terms of agents for example) and don't warn in these cases, which are legal but not recommended from "our" point of view.

Raphael Mack <ramack>
Group administrator
Tue 18 Sep 2018 01:43:49 PM UTC, comment #1: 

according to the flowchart shown on https://wiki.liberty-eiffel.org/index.php/Syntax_diagrams#Inspect an 'else clause' is  optional, so likely the code might have been correct?

- <_92048>
Tue 05 Jan 2016 10:22:08 PM UTC, original submission:  

I stumbled over some code with an inspect without an else clause, where actually the error handling was missing.

Shouldn't we emit a warning for inspect without else?

Raphael Mack <ramack>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by _92048 (Posted a comment)
  • -email is unavailable- added by ramack (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-14 ramack Planned Releasecurtiss dennis

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code