Preparing report...

Report for github.com/mkfsn/notion-go

A+    Excellent!    Found 11 issues across 29 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint62%

Golint is a linter for Go source code.

    • notion-go/api.go
    • Line 11: warning: exported const APIBaseURL should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported const DefaultNotionVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported type API should have comment or be unexported (golint)
    • Line 47: warning: exported function New should have comment or be unexported (golint)
    • Line 70: warning: exported method API.Users should have comment or be unexported (golint)
    • Line 74: warning: exported method API.Databases should have comment or be unexported (golint)
    • Line 78: warning: exported method API.Pages should have comment or be unexported (golint)
    • Line 82: warning: exported method API.Blocks should have comment or be unexported (golint)
    • Line 86: warning: exported method API.Search should have comment or be unexported (golint)
    • Line 97: warning: exported type APISetting should have comment or be unexported (golint)
    • Line 99: warning: exported function WithBaseURL should have comment or be unexported (golint)
    • Line 105: warning: exported function WithNotionVersion should have comment or be unexported (golint)
    • Line 111: warning: exported function WithUserAgent should have comment or be unexported (golint)
    • Line 117: warning: exported function WithHTTPClient should have comment or be unexported (golint)
    • notion-go/blocks.go
    • Line 13: warning: exported type Block should have comment or be unexported (golint)
    • Line 17: warning: exported type BlockBase should have comment or be unexported (golint)
    • Line 34: warning: exported type ParagraphBlock should have comment or be unexported (golint)
    • Line 39: warning: exported type HeadingBlock should have comment or be unexported (golint)
    • Line 43: warning: exported method HeadingBlock.UnmarshalJSON should have comment or be unexported (golint)
    • Line 61: warning: exported type Heading1Block should have comment or be unexported (golint)
    • Line 66: warning: exported type Heading2Block should have comment or be unexported (golint)
    • Line 71: warning: exported type Heading3Block should have comment or be unexported (golint)
    • Line 76: warning: exported type RichTextBlock should have comment or be unexported (golint)
    • Line 81: warning: exported method RichTextBlock.UnmarshalJSON should have comment or be unexported (golint)
    • Line 106: warning: exported type BulletedListItemBlock should have comment or be unexported (golint)
    • Line 111: warning: exported type NumberedListItemBlock should have comment or be unexported (golint)
    • Line 116: warning: exported type RichTextWithCheckBlock should have comment or be unexported (golint)
    • Line 122: warning: exported type ToDoBlock should have comment or be unexported (golint)
    • Line 127: warning: exported type ToggleBlock should have comment or be unexported (golint)
    • Line 132: warning: exported type TitleBlock should have comment or be unexported (golint)
    • Line 136: warning: exported type ChildPageBlock should have comment or be unexported (golint)
    • Line 141: warning: exported type UnsupportedBlock should have comment or be unexported (golint)
    • Line 145: warning: exported type BlocksInterface should have comment or be unexported (golint)
    • Line 167: warning: exported type BlocksChildrenListParameters should have comment or be unexported (golint)
    • Line 174: warning: exported type BlocksChildrenListResponse should have comment or be unexported (golint)
    • Line 179: warning: exported method BlocksChildrenListResponse.UnmarshalJSON should have comment or be unexported (golint)
    • Line 202: warning: exported type BlocksChildrenAppendParameters should have comment or be unexported (golint)
    • Line 209: warning: exported type BlocksChildrenAppendResponse should have comment or be unexported (golint)
    • Line 213: warning: exported method BlocksChildrenAppendResponse.UnmarshalJSON should have comment or be unexported (golint)
    • Line 225: warning: exported type BlocksChildrenInterface should have comment or be unexported (golint)
    • notion-go/consts.go
    • Line 3: warning: exported type BlockType should have comment or be unexported (golint)
    • Line 6: warning: exported const BlockTypeParagraph should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type Color should have comment or be unexported (golint)
    • Line 21: warning: exported const ColorDefault should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported type NumberFormat should have comment or be unexported (golint)
    • Line 45: warning: exported const NumberFormatNumber should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: exported type FormulaValueType should have comment or be unexported (golint)
    • Line 61: warning: exported const FormulaValueTypeString should have comment (or a comment on this block) or be unexported (golint)
    • Line 67: warning: exported type RollupFunction should have comment or be unexported (golint)
    • Line 70: warning: exported const RollupFunctionCountAll should have comment (or a comment on this block) or be unexported (golint)
    • Line 85: warning: exported type ObjectType should have comment or be unexported (golint)
    • Line 88: warning: exported const ObjectTypeBlock should have comment (or a comment on this block) or be unexported (golint)
    • Line 95: warning: exported type ParentType should have comment or be unexported (golint)
    • Line 98: warning: exported const ParentTypeDatabase should have comment (or a comment on this block) or be unexported (golint)
    • Line 103: warning: exported type PropertyType should have comment or be unexported (golint)
    • Line 106: warning: exported const PropertyTypeTitle should have comment (or a comment on this block) or be unexported (golint)
    • Line 127: warning: exported type PropertyValueType should have comment or be unexported (golint)
    • Line 130: warning: exported const PropertyValueTypeRichText should have comment (or a comment on this block) or be unexported (golint)
    • Line 151: warning: exported type RichTextType should have comment or be unexported (golint)
    • Line 154: warning: exported const RichTextTypeText should have comment (or a comment on this block) or be unexported (golint)
    • Line 159: warning: exported type SearchFilterValue should have comment or be unexported (golint)
    • Line 162: warning: exported const SearchFilterValuePage should have comment (or a comment on this block) or be unexported (golint)
    • Line 166: warning: exported type SearchFilterProperty should have comment or be unexported (golint)
    • Line 169: warning: exported const SearchFilterPropertyObject should have comment (or a comment on this block) or be unexported (golint)
    • Line 172: warning: exported type SearchSortDirection should have comment or be unexported (golint)
    • Line 175: warning: exported const SearchSortDirectionAscending should have comment (or a comment on this block) or be unexported (golint)
    • Line 179: warning: exported type SearchSortTimestamp should have comment or be unexported (golint)
    • Line 182: warning: exported const SearchSortTimestampLastEditedTime should have comment (or a comment on this block) or be unexported (golint)
    • Line 185: warning: exported type SortTimestamp should have comment or be unexported (golint)
    • Line 188: warning: exported const SortTimestampByCreatedTime should have comment (or a comment on this block) or be unexported (golint)
    • Line 192: warning: exported type SortDirection should have comment or be unexported (golint)
    • Line 195: warning: exported const SortDirectionAscending should have comment (or a comment on this block) or be unexported (golint)
    • Line 199: warning: exported type UserType should have comment or be unexported (golint)
    • Line 202: warning: exported const UserTypePerson should have comment (or a comment on this block) or be unexported (golint)
    • notion-go/errors.go
    • Line 9: warning: exported var ErrUnknown should have comment or be unexported (golint)
    • Line 16: warning: exported const ErrorCodeInvalidJSON should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type HTTPError should have comment or be unexported (golint)
    • notion-go/pages.go
    • Line 13: warning: exported type Parent should have comment or be unexported (golint)
    • Line 23: warning: exported type DatabaseParent should have comment or be unexported (golint)
    • Line 28: warning: exported type PageParent should have comment or be unexported (golint)
    • Line 33: warning: exported type WorkspaceParent should have comment or be unexported (golint)
    • Line 37: warning: exported type ParentInput should have comment or be unexported (golint)
    • Line 45: warning: exported type DatabaseParentInput should have comment or be unexported (golint)
    • Line 50: warning: exported type PageParentInput should have comment or be unexported (golint)
    • Line 55: warning: exported type Page should have comment or be unexported (golint)
    • Line 72: warning: exported method Page.UnmarshalJSON should have comment or be unexported (golint)
    • Line 100: warning: exported type PropertyValue should have comment or be unexported (golint)
    • Line 115: warning: exported type TitlePropertyValue should have comment or be unexported (golint)
    • Line 120: warning: exported method TitlePropertyValue.UnmarshalJSON should have comment or be unexported (golint)
    • Line 143: warning: exported type RichTextPropertyValue should have comment or be unexported (golint)
    • Line 148: warning: exported method RichTextPropertyValue.UnmarshalJSON should have comment or be unexported (golint)
    • Line 171: warning: exported type NumberPropertyValue should have comment or be unexported (golint)
    • Line 176: warning: exported type SelectPropertyValueOption should have comment or be unexported (golint)
    • Line 182: warning: exported type SelectPropertyValue should have comment or be unexported (golint)
    • Line 187: warning: exported type MultiSelectPropertyValueOption should have comment or be unexported (golint)
    • Line 193: warning: exported type MultiSelectPropertyValue should have comment or be unexported (golint)
    • Line 198: warning: exported type Date should have comment or be unexported (golint)
    • Line 203: warning: exported type DatePropertyValue should have comment or be unexported (golint)
    • Line 208: warning: exported type FormulaValue should have comment or be unexported (golint)
    • Line 218: warning: exported type StringFormulaValue should have comment or be unexported (golint)
    • Line 223: warning: exported type NumberFormulaValue should have comment or be unexported (golint)
    • Line 228: warning: exported type BooleanFormulaValue should have comment or be unexported (golint)
    • Line 233: warning: exported type DateFormulaValue should have comment or be unexported (golint)
    • Line 238: warning: exported type FormulaPropertyValue should have comment or be unexported (golint)
    • Line 243: warning: exported method FormulaPropertyValue.UnmarshalJSON should have comment or be unexported (golint)
    • Line 262: warning: exported type PageReference should have comment or be unexported (golint)
    • Line 266: warning: exported type RelationPropertyValue should have comment or be unexported (golint)
    • Line 271: warning: exported type RollupValueType should have comment or be unexported (golint)
    • Line 281: warning: exported type NumberRollupValue should have comment or be unexported (golint)
    • Line 286: warning: exported type DateRollupValue should have comment or be unexported (golint)
    • Line 291: warning: exported type ArrayRollupValue should have comment or be unexported (golint)
    • Line 296: warning: exported type RollupPropertyValue should have comment or be unexported (golint)
    • Line 301: warning: exported type PeoplePropertyValue should have comment or be unexported (golint)
    • Line 306: warning: exported type File should have comment or be unexported (golint)
    • Line 310: warning: exported type FilesPropertyValue should have comment or be unexported (golint)
    • Line 315: warning: exported type CheckboxPropertyValue should have comment or be unexported (golint)
    • Line 320: warning: exported type URLPropertyValue should have comment or be unexported (golint)
    • Line 325: warning: exported type EmailPropertyValue should have comment or be unexported (golint)
    • Line 330: warning: exported type PhoneNumberPropertyValue should have comment or be unexported (golint)
    • Line 335: warning: exported type CreatedTimePropertyValue should have comment or be unexported (golint)
    • Line 340: warning: exported type CreatedByPropertyValue should have comment or be unexported (golint)
    • Line 345: warning: exported type LastEditedTimePropertyValue should have comment or be unexported (golint)
    • Line 350: warning: exported type LastEditedByPropertyValue should have comment or be unexported (golint)
    • Line 355: warning: exported type PagesRetrieveParameters should have comment or be unexported (golint)
    • Line 359: warning: exported type PagesRetrieveResponse should have comment or be unexported (golint)
    • Line 363: warning: exported type PagesUpdateParameters should have comment or be unexported (golint)
    • Line 368: warning: exported type PagesUpdateResponse should have comment or be unexported (golint)
    • Line 372: warning: exported type PagesCreateParameters should have comment or be unexported (golint)
    • Line 381: warning: exported type PagesCreateResponse should have comment or be unexported (golint)
    • Line 385: warning: exported type PagesInterface should have comment or be unexported (golint)
    • notion-go/search.go
    • Line 11: warning: exported type SearchFilter should have comment or be unexported (golint)
    • Line 22: warning: exported type SearchSort should have comment or be unexported (golint)
    • Line 29: warning: exported type SearchParameters should have comment or be unexported (golint)
    • Line 36: warning: exported type SearchableObject should have comment or be unexported (golint)
    • Line 40: warning: exported type SearchResponse should have comment or be unexported (golint)
    • Line 45: warning: exported method SearchResponse.UnmarshalJSON should have comment or be unexported (golint)
    • Line 68: warning: exported type SearchInterface should have comment or be unexported (golint)
    • notion-go/users.go
    • Line 12: warning: exported type User should have comment or be unexported (golint)
    • Line 26: warning: exported type Person should have comment or be unexported (golint)
    • Line 30: warning: exported type PersonUser should have comment or be unexported (golint)
    • Line 35: warning: exported type Bot should have comment or be unexported (golint)
    • Line 37: warning: exported type BotUser should have comment or be unexported (golint)
    • Line 42: warning: exported type UsersRetrieveParameters should have comment or be unexported (golint)
    • Line 46: warning: exported type UsersRetrieveResponse should have comment or be unexported (golint)
    • Line 50: warning: exported method UsersRetrieveResponse.UnmarshalJSON should have comment or be unexported (golint)
    • Line 62: warning: exported type UsersListParameters should have comment or be unexported (golint)
    • Line 66: warning: exported type UsersListResponse should have comment or be unexported (golint)
    • Line 71: warning: exported method UsersListResponse.UnmarshalJSON should have comment or be unexported (golint)
    • Line 94: warning: exported type UsersInterface should have comment or be unexported (golint)
    • notion-go/databases.go
    • Line 13: warning: exported type Database should have comment or be unexported (golint)
    • Line 25: warning: exported method Database.UnmarshalJSON should have comment or be unexported (golint)
    • Line 55: warning: exported type Annotations should have comment or be unexported (golint)
    • Line 70: warning: exported type RichText should have comment or be unexported (golint)
    • Line 74: warning: exported type BaseRichText should have comment or be unexported (golint)
    • Line 88: warning: exported type Link should have comment or be unexported (golint)
    • Line 94: warning: exported type TextObject should have comment or be unexported (golint)
    • Line 99: warning: exported type RichTextText should have comment or be unexported (golint)
    • Line 104: warning: exported type Mention should have comment or be unexported (golint)
    • Line 114: warning: exported type UserMention should have comment or be unexported (golint)
    • Line 119: warning: exported type PageMention should have comment or be unexported (golint)
    • Line 126: warning: exported type DatabaseMention should have comment or be unexported (golint)
    • Line 133: warning: exported type DateMention should have comment or be unexported (golint)
    • Line 138: warning: exported type RichTextMention should have comment or be unexported (golint)
    • Line 143: warning: exported type EquationObject should have comment or be unexported (golint)
    • Line 147: warning: exported type RichTextEquation should have comment or be unexported (golint)
    • Line 152: warning: exported type Property should have comment or be unexported (golint)
    • Line 167: warning: exported type TitleProperty should have comment or be unexported (golint)
    • Line 172: warning: exported type RichTextProperty should have comment or be unexported (golint)
    • Line 177: warning: exported type NumberPropertyOption should have comment or be unexported (golint)
    • Line 181: warning: exported type NumberProperty should have comment or be unexported (golint)
    • Line 186: warning: exported type SelectOption should have comment or be unexported (golint)
    • Line 192: warning: exported type MultiSelectOption should have comment or be unexported (golint)
    • Line 198: warning: exported type SelectPropertyOption should have comment or be unexported (golint)
    • Line 202: warning: exported type SelectProperty should have comment or be unexported (golint)
    • Line 207: warning: exported type MultiSelectPropertyOption should have comment or be unexported (golint)
    • Line 211: warning: exported type MultiSelectProperty should have comment or be unexported (golint)
    • Line 216: warning: exported type DateProperty should have comment or be unexported (golint)
    • Line 221: warning: exported type PeopleProperty should have comment or be unexported (golint)
    • Line 226: warning: exported type FileProperty should have comment or be unexported (golint)
    • Line 231: warning: exported type CheckboxProperty should have comment or be unexported (golint)
    • Line 236: warning: exported type URLProperty should have comment or be unexported (golint)
    • Line 241: warning: exported type EmailProperty should have comment or be unexported (golint)
    • Line 246: warning: exported type PhoneNumberProperty should have comment or be unexported (golint)
    • Line 251: warning: exported type Formula should have comment or be unexported (golint)
    • Line 255: warning: exported type FormulaProperty should have comment or be unexported (golint)
    • Line 260: warning: exported type Relation should have comment or be unexported (golint)
    • Line 266: warning: exported type RelationProperty should have comment or be unexported (golint)
    • Line 271: warning: exported type RollupPropertyOption should have comment or be unexported (golint)
    • Line 279: warning: exported type RollupProperty should have comment or be unexported (golint)
    • Line 284: warning: exported type CreatedTimeProperty should have comment or be unexported (golint)
    • Line 289: warning: exported type CreatedByProperty should have comment or be unexported (golint)
    • Line 294: warning: exported type LastEditedTimeProperty should have comment or be unexported (golint)
    • Line 299: warning: exported type LastEditedByProperty should have comment or be unexported (golint)
    • Line 304: warning: exported type DatabasesRetrieveParameters should have comment or be unexported (golint)
    • Line 308: warning: exported type DatabasesRetrieveResponse should have comment or be unexported (golint)
    • Line 312: warning: exported type DatabasesListParameters should have comment or be unexported (golint)
    • Line 316: warning: exported type DatabasesListResponse should have comment or be unexported (golint)
    • Line 321: warning: exported type Sort should have comment or be unexported (golint)
    • Line 327: warning: exported type Filter should have comment or be unexported (golint)
    • Line 331: warning: exported type SinglePropertyFilter should have comment or be unexported (golint)
    • Line 337: warning: exported type TextFilter should have comment or be unexported (golint)
    • Line 358: warning: exported type NumberFilter should have comment or be unexported (golint)
    • Line 375: warning: exported type CheckboxFilter should have comment or be unexported (golint)
    • Line 386: warning: exported type SelectFilter should have comment or be unexported (golint)
    • Line 399: warning: exported type MultiSelectFilter should have comment or be unexported (golint)
    • Line 412: warning: exported type DateFilter should have comment or be unexported (golint)
    • Line 436: warning: exported type PeopleFilter should have comment or be unexported (golint)
    • Line 451: warning: exported type FilesFilter should have comment or be unexported (golint)
    • Line 462: warning: exported type RelationFilter should have comment or be unexported (golint)
    • Line 475: warning: exported type FormulaFilter should have comment or be unexported (golint)
    • Line 488: warning: exported type CompoundFilter should have comment or be unexported (golint)
    • Line 495: warning: exported type DatabasesQueryParameters should have comment or be unexported (golint)
    • Line 507: warning: exported type DatabasesQueryResponse should have comment or be unexported (golint)
    • Line 512: warning: exported type DatabasesInterface should have comment or be unexported (golint)
    • notion-go/pagination.go
    • Line 3: warning: exported type PaginationParameters should have comment or be unexported (golint)
    • Line 11: warning: exported type PaginatedList should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!