Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup checklist #162

Closed
7 tasks done
jhamman opened this issue Nov 21, 2014 · 1 comment
Closed
7 tasks done

Code cleanup checklist #162

jhamman opened this issue Nov 21, 2014 · 1 comment

Comments

@jhamman
Copy link
Member

jhamman commented Nov 21, 2014

Now that 4.2 has been released, we can move forward on cleaning up the source code. I spent a bit of time reading back through our discussion in #7, #48, and #134 and will try and provide an outline of what we need to do in order to close those issues. One common thread that I think we want to stick to is to only keep documentation that is relevant and needed, extra stuff just leads to confusion down the road.

Code Cleanup:

Code Formatting (#48):

  • Run Uncrustify of all source files in repository. @bartnijssen has already put together an uncrustify options template.

  • Implement a consistent file header format. In my opinion we should adopt a common format that would also play nice with code documentation tools like doxygen. This would include the following pieces:

    • filename
    • original author(s)
    • description
    • license boilerplate

    _Example header format:_

    /*
    * \section DESCRIPTION
    *
    * A short description 
    *
    * \section LICENSE
    *
    * The Variable Infiltration Capacity (VIC) macroscale hydrological model
    * Copyright (C) 2014  The Land Surface Hydrology Group, Department of Civil
    * and Environmental Engineering, University of Washington.
    *
    * The VIC model is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    *
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License along with
    * this program; if not, write to the Free Software Foundation, Inc.,
    * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    */
  • Implement a consistent function header format (done in source files). This would include the following pieces:

    • description
    • citation (optional)
    • input parameters (optional)
    • return value

    _Example function header format:_

    /*
    * \brief        description of function
    */
    int my_fun(double name1, double name2, int name3) {
    ...
    }
@jhamman
Copy link
Member Author

jhamman commented Dec 8, 2014

closed via #169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant