|
|
|
|
| <!DOCTYPE html>
|
|
|
| <html lang="en" data-content_root="./">
|
| <head>
|
| <meta charset="utf-8" />
|
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
| <title>Code Review Notes — pgAdmin 4 8.6 documentation</title>
|
| <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
| <link rel="stylesheet" type="text/css" href="_static/style.css?v=d36593c3" />
|
|
|
| <script src="_static/documentation_options.js?v=d4c83366"></script>
|
| <script src="_static/doctools.js?v=9a2dae69"></script>
|
| <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
|
| <script src="_static/sidebar.js"></script>
|
|
|
| <link rel="index" title="Index" href="genindex.html" />
|
| <link rel="search" title="Search" href="search.html" />
|
| <link rel="next" title="Translations" href="translations.html" />
|
| <link rel="prev" title="Code Snippets" href="code_snippets.html" />
|
| </head><body>
|
| <div class="related" role="navigation" aria-label="related navigation">
|
| <h3>Navigation</h3>
|
| <ul>
|
| <li class="right" style="margin-right: 10px">
|
| <a href="genindex.html" title="General Index"
|
| accesskey="I">index</a></li>
|
| <li class="right" >
|
| <a href="translations.html" title="Translations"
|
| accesskey="N">next</a> |</li>
|
| <li class="right" >
|
| <a href="code_snippets.html" title="Code Snippets"
|
| accesskey="P">previous</a> |</li>
|
| <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> »</li>
|
| <li class="nav-item nav-item-1"><a href="contributions.html" accesskey="U">pgAdmin Project Contributions</a> »</li>
|
| <li class="nav-item nav-item-this"><a href="">Code Review Notes</a></li>
|
| </ul>
|
| </div>
|
|
|
| <div class="document">
|
| <div class="documentwrapper">
|
| <div class="bodywrapper">
|
| <div class="body" role="main">
|
|
|
| <section id="code-review-notes">
|
| <span id="code-review"></span><h1><span class="target" id="index-0"></span>Code Review Notes<a class="headerlink" href="#code-review-notes" title="Link to this heading">¶</a></h1>
|
| <p>This document lists a number of standard items that will be checked during the
|
| review process for any changes submitted for inclusion in pgAdmin.</p>
|
| <ul>
|
| <li><p>Ensure all code follows the pgAdmin <a class="reference internal" href="coding_standards.html"><span class="doc">Coding Standards</span></a>.</p></li>
|
| <li><p>Ensure all code has unit test coverage and API/feature test coverage where
|
| appropriate.</p></li>
|
| <li><p>Copyright years must be correct and properly formatted (to make it easy to make
|
| bulk updates every year). The start date should always be 2013, and the end year
|
| the current year, e.g.</p>
|
| <blockquote>
|
| <div><p>Copyright (C) 2013 - 2024, The pgAdmin Development Team</p>
|
| </div></blockquote>
|
| </li>
|
| <li><p>Ensure there’s a blank line immediately following any copyright headers.</p></li>
|
| <li><p>Include PyDoc comments for functions, classes and modules. Node modules should
|
| be “””Implements the XXXX node”””.</p></li>
|
| <li><p>Ensure that any generated SQL does not have any leading or trailing blank lines
|
| and consistently uses 4 space indents for nice formatting.</p></li>
|
| <li><p>Don’t special-case any Slony objects. pgAdmin 4 will have no direct knowledge
|
| of Slony, unlike pgAdmin 3.</p></li>
|
| <li><p>If you copy/paste modules, please ensure any comments are properly updated.</p></li>
|
| <li><p>Read all comments, and ensure they make sense and provide useful commentary on
|
| the code.</p></li>
|
| <li><p>Ensure that field labels both use PostgreSQL parlance, but also are descriptive.
|
| A good example is the “Init” field on an FTS Template - Init is the PG term, but
|
| adding the word “Function” after it makes it much more descriptive.</p></li>
|
| <li><p>Re-use code whereever possible, but factor it out into a suitably central
|
| location - don’t copy and paste it unless modifications are required!</p></li>
|
| <li><p>Format code nicely to make it readable. Break up logical chunks of code with
|
| blank lines, and comment well to describe what different sections of code are
|
| for or pertain to.</p></li>
|
| <li><p>Ensure that form validation works correctly and is consistent with other
|
| dialogues in the way errors are displayed.</p></li>
|
| <li><p>On dialogues with Schema or Owner fields, pre-set the default values to the
|
| current schema/user as appropriate. In general, if there are common or sensible
|
| default values available, put them in the fields for the user.</p></li>
|
| <li><p>1 Pull Request == 1 feature. If you need to fix/update existing
|
| infrastructure in your change, it’s usually easier if it’s in a separate
|
| Pull Request. Pull Requests containing multiple new features or unrelated
|
| changes are likely to be rejected.</p></li>
|
| <li><p>Ensure the change is fully functional, and works! If you wish to send a
|
| work in progress (WIP) change that is not intended for commit, instead of
|
| submitting a Pull Request, send either as a link to a repository fork or a
|
| patch to the <a class="reference external" href="mailto:pgadmin-hackers%40postgresql.org">pgadmin-hackers<span>@</span>postgresql<span>.</span>org</a> mailing list, clearly stating
|
| that it’s a WIP, and noting what does or does not yet work.</p></li>
|
| </ul>
|
| </section>
|
|
|
|
|
| <div class="clearer"></div>
|
| </div>
|
| </div>
|
| </div>
|
| <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| <div class="sphinxsidebarwrapper">
|
| <h3><a href="index.html">Table of Contents</a></h3>
|
| <ul class="current">
|
| <li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="external_database.html">External database for pgAdmin user settings</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="connecting.html">Connecting To A Server</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="managing_cluster_objects.html">Managing Cluster Objects</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="managing_database_objects.html">Managing Database Objects</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="modifying_tables.html">Creating or Modifying a Table</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="management_basics.html">Management Basics</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="backup_and_restore.html">Backup and Restore</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="developer_tools.html">Developer Tools</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="processes.html">Processes</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="pgagent.html">pgAgent</a></li>
|
| <li class="toctree-l1 current"><a class="reference internal" href="contributions.html">pgAdmin Project Contributions</a><ul class="current">
|
| <li class="toctree-l2"><a class="reference internal" href="submitting_pull_requests.html">Submitting Pull Requests</a></li>
|
| <li class="toctree-l2"><a class="reference internal" href="code_overview.html">Code Overview</a></li>
|
| <li class="toctree-l2"><a class="reference internal" href="coding_standards.html">Coding Standards</a></li>
|
| <li class="toctree-l2"><a class="reference internal" href="code_snippets.html">Code Snippets</a></li>
|
| <li class="toctree-l2 current"><a class="current reference internal" href="#">Code Review Notes</a></li>
|
| <li class="toctree-l2"><a class="reference internal" href="translations.html">Translations</a></li>
|
| </ul>
|
| </li>
|
| <li class="toctree-l1"><a class="reference internal" href="release_notes.html">Release Notes</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="licence.html">Licence</a></li>
|
| </ul>
|
|
|
| <search id="searchbox" style="display: none" role="search">
|
| <h3 id="searchlabel">Quick search</h3>
|
| <div class="searchformwrapper">
|
| <form class="search" action="search.html" method="get">
|
| <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| <input type="submit" value="Go" />
|
| </form>
|
| </div>
|
| </search>
|
| <script>document.getElementById('searchbox').style.display = "block"</script>
|
| </div>
|
| <div id="sidebarbutton" title="Collapse sidebar">
|
| <span>«</span>
|
| </div>
|
|
|
| </div>
|
| <div class="clearer"></div>
|
| </div>
|
| <div class="related" role="navigation" aria-label="related navigation">
|
| <h3>Navigation</h3>
|
| <ul>
|
| <li class="right" style="margin-right: 10px">
|
| <a href="genindex.html" title="General Index"
|
| >index</a></li>
|
| <li class="right" >
|
| <a href="translations.html" title="Translations"
|
| >next</a> |</li>
|
| <li class="right" >
|
| <a href="code_snippets.html" title="Code Snippets"
|
| >previous</a> |</li>
|
| <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> »</li>
|
| <li class="nav-item nav-item-1"><a href="contributions.html" >pgAdmin Project Contributions</a> »</li>
|
| <li class="nav-item nav-item-this"><a href="">Code Review Notes</a></li>
|
| </ul>
|
| </div>
|
| <div class="footer" role="contentinfo">
|
| <div class="related" role="navigation" aria-label="related navigation">
|
| <ul>
|
| <li class="left" style="margin-left: 10px">© Copyright (C) 2013 - 2024, The pgAdmin Development Team.</li>
|
| <li class="right" style="margin-right: 10px"><a href="genindex.html" title="General Index" accesskey="I">index</a></li>
|
| <li class="right" ><a href="translations.html" title="Translations" accesskey="N">next</a> |</li>
|
| <li class="right" ><a href="code_snippets.html" title="Code Snippets" accesskey="P">previous</a> |</li>
|
| </ul>
|
| </div>
|
| </div>
|
| </body>
|
| </html> |