Skip to content

[lsp-tree-sitter] textDocument/codeAction: sort variable by an official recommended order #20

Open

Description

@lahwaacz

I'm getting the following on the doxygen PKGBUILD:

E   1 # Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>     ■ Split PKGBUILD needs additional makedepends ['libfmt.so', 'libspdlog.so', 'libsqlite3.so'] to work properly
    2 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
    3 # Contributor: Dan McGee <dan@archlinux.org>
    4
    5 pkgbase=doxygen
    6 pkgname=(doxygen doxygen-docs)
W   7 pkgver=1.11.0     ■ pkgver: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
W   8 pkgrel=4     ■ pkgrel: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
W   9 pkgdesc='Documentation system for C++, C, Java, IDL and PHP'     ■ pkgdesc: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
W  10 url='http://www.doxygen.nl'     ■ url: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
   11 arch=(x86_64)
...
  103 package_doxygen-docs() {
W 104   pkgdesc='Developer documentation for doxygen'     ■ pkgdesc: is unsorted due to pkgbase@file:///home/lahwaacz/doxygen/PKGBUILD:5:1-5:7
  105
  106   mv -v $pkgname/* "$pkgdir"
  107   install -vDm 644 $pkgbase-Release_${pkgver//./_}/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  108 }
  109
  110 # vim: ts=2 sw=2 et:

Why does it warn about unsorted pkgver, pkgrel, pkgdesc and url? Also note that a pkgdesc defined in the package_doxygen-docs function is fine too.

Activity

  1. Freed-Wu commented on Jul 9, 2024

    @Freed-Wu
    Collaborator

    warn about unsorted

    Refer #19 (comment)

    pkgdesc defined in the package_doxygen-docs function is fine too.

    Should be an unexpected behaviour.

  2. added
    bug
    on Jul 9, 2024
  3. lahwaacz commented on Jul 9, 2024

    @lahwaacz
    Author

    Refer #19 (comment)

    But here the order pkgname, pkgver, pkgrel is correct, only they are placed after pkgbase.

  4. Freed-Wu commented on Jul 9, 2024

    @Freed-Wu
    Collaborator

    I see, the order comes from man 5 PKGBUILD, in the man, pkgbase is placed after them. 😢

  5. lahwaacz commented on Jul 9, 2024

    @lahwaacz
    Author

    That is because split packages are not that common, so pkgbase is explained near the end of the manual page. But it does not suggest that pkgbase should be at the bottom - typically it is either right before or right after pkgname. See PKGBUILD-split.proto or some PKGBUILDs of official Arch packages.

  6. Freed-Wu commented on Jul 9, 2024

    @Freed-Wu
    Collaborator

    So the order should be adapted to the official recommended order. Except man, is there any good official information about it?

  7. lahwaacz commented on Jul 9, 2024

    @lahwaacz
    Author

    I guess only the PKGBUILD-split.proto file or making a sample from the official Arch packages...

  8. changed the title [-]False positive warnings on split packages?[/-] [+]Sort variable order by official recommended order and ignore theses variables defined in function[/+] on Nov 7, 2024
  9. changed the title [-]Sort variable order by official recommended order and ignore theses variables defined in function[/-] [+]Sort variables by official recommended order and ignore theses variables defined in function[/+] on Nov 7, 2024
  10. changed the title [-]Sort variables by official recommended order and ignore theses variables defined in function[/-] [+]Sort variables by official recommended order and ignore variables defined in function[/+] on Nov 7, 2024
  11. added
    enhancement
    and removed
    bug
    on Nov 7, 2024
  12. changed the title [-]Sort variables by official recommended order and ignore variables defined in function[/-] [+][feature] textDocument/codeAction: sort variable by an official recommended order[/+] on Jul 20, 2026
  13. changed the title [-][feature] textDocument/codeAction: sort variable by an official recommended order[/-] [+][pkgbuild] textDocument/codeAction: sort variable by an official recommended order[/+] on Jul 20, 2026
  14. changed the title [-][pkgbuild] textDocument/codeAction: sort variable by an official recommended order[/-] [+][lsp-tree-sitter] textDocument/codeAction: sort variable by an official recommended order[/+] on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions