mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Massenzio (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MESOS-2766) Add validation behavior to FlagsBase
Date Tue, 02 Jun 2015 18:03:50 GMT

     [ https://issues.apache.org/jira/browse/MESOS-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marco Massenzio updated MESOS-2766:
-----------------------------------
    Summary: Add validation behavior to FlagsBase  (was: Add to FlagsBase the default --help
behavior)

> Add validation behavior to FlagsBase
> ------------------------------------
>
>                 Key: MESOS-2766
>                 URL: https://issues.apache.org/jira/browse/MESOS-2766
>             Project: Mesos
>          Issue Type: Bug
>          Components: stout
>            Reporter: Marco Massenzio
>            Assignee: Anand Mazumdar
>            Priority: Minor
>              Labels: tech-debt
>
> In every "launcher" file (ie, those containing some variation on {{main()}}) there is
a minor variation on:
> {code}
>   if (flags.help) {
>     cout << flags.usage() << endl;
>     // arguably this is not an error: the user asked for help,
>     // and she got it: // the program execution ought to be
>     // considered successful.
>     return EXIT_SUCCESS;
>   }
> {code}
> As this is default behavior, and we've added support for the {{--help}} flag in the {{FlagsBase}}
class, we should add this too there and remove it from everywhere else.
> This follows the DRY principle.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message