wgoodall01/wikipath

View on GitHub

Showing 21 of 23 total issues

Function render has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    const {to, from, result, status, err} = this.state;
    const {path, duration, touched} = result || {};

    let body = null;
Severity: Minor
Found in web/wikipath-web/src/App.js - About 1 hr to fix

    Avoid deeply nested control flow statements.
    Open

                    if linkPath.Len() < foundPath.Len() {
                        foundPath.Prev = linkPath.Prev
                    }
    Severity: Major
    Found in wp/index.go - About 45 mins to fix

      exported type RandomHandler should have comment or be unexported
      Open

      type RandomHandler struct {
      Severity: Minor
      Found in web/random.go by golint

      exported type QueryHandler should have comment or be unexported
      Open

      type QueryHandler struct {
      Severity: Minor
      Found in web/query.go by golint

      if block ends with a return statement, so drop this else and outdent its block
      Open

              } else {
      Severity: Minor
      Found in wp/index.go by golint

      exported method IndexPath.Len should have comment or be unexported
      Open

      func (path *IndexPath) Len() int {
      Severity: Minor
      Found in wp/indexpath.go by golint

      func NewHttpError should be NewHTTPError
      Open

      func NewHttpError(status int, message string) *HttpError {
      Severity: Minor
      Found in web/error.go by golint

      exported function NewRandomHandler should have comment or be unexported
      Open

      func NewRandomHandler(ind *wp.Index) *RandomHandler {
      Severity: Minor
      Found in web/random.go by golint

      exported type HttpError should have comment or be unexported
      Open

      type HttpError struct {
      Severity: Minor
      Found in web/error.go by golint

      don't use ALL_CAPS in Go names; use CamelCase
      Open

      const MAX_DEPTH int = 10 // Maximum query depth.
      Severity: Minor
      Found in web/web.go by golint

      should not use dot imports
      Open

          . "github.com/wgoodall01/wikipath/wp"
      Severity: Minor
      Found in cli/startcmd.go by golint

      should not use dot imports
      Open

          . "github.com/wgoodall01/wikipath/wp"
      Severity: Minor
      Found in cli/indexshowcmd.go by golint

      exported type PathResponse should have comment or be unexported
      Open

      type PathResponse struct {
      Severity: Minor
      Found in web/query.go by golint

      exported type RandomResponse should have comment or be unexported
      Open

      type RandomResponse struct {
      Severity: Minor
      Found in web/random.go by golint

      should not use dot imports
      Open

          . "github.com/wgoodall01/wikipath/wp"
      Severity: Minor
      Found in cli/indexcmd.go by golint

      exported function NewHttpError should have comment or be unexported
      Open

      func NewHttpError(status int, message string) *HttpError {
      Severity: Minor
      Found in web/error.go by golint

      type HttpError should be HTTPError
      Open

      type HttpError struct {
      Severity: Minor
      Found in web/error.go by golint

      exported function NewQueryHandler should have comment or be unexported
      Open

      func NewQueryHandler(ind *wp.Index) *QueryHandler {
      Severity: Minor
      Found in web/query.go by golint

      exported method HttpError.Send should have comment or be unexported
      Open

      func (he *HttpError) Send(w http.ResponseWriter) {
      Severity: Minor
      Found in web/error.go by golint

      exported const MAX_DEPTH should have comment or be unexported
      Open

      const MAX_DEPTH int = 10 // Maximum query depth.
      Severity: Minor
      Found in web/web.go by golint
      Severity
      Category
      Status
      Source
      Language