diff --git a/.github/workflows/recrawler.yml b/.github/workflows/recrawler.yml index ee832e273a1..47f042bcd87 100644 --- a/.github/workflows/recrawler.yml +++ b/.github/workflows/recrawler.yml @@ -1,22 +1,22 @@ -name: Algolia Recrawl -on: - push: - branches: [ master ] - workflow_dispatch: +# name: Algolia Recrawl +# on: +# push: +# branches: [ master ] +# workflow_dispatch: -jobs: - algolia_recrawl: - name: Algolia Recrawl - runs-on: ubuntu-latest - steps: - - name: Algolia crawler creation and crawl - uses: algolia/algoliasearch-crawler-github-actions@v1.1.0 - id: algolia_crawler - with: - crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} - crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} - algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} - algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} - site-url: 'https://noir-lang.org/' - crawler-name: noir-lang - override-config: false +# jobs: +# algolia_recrawl: +# name: Algolia Recrawl +# runs-on: ubuntu-latest +# steps: +# - name: Algolia crawler creation and crawl +# uses: algolia/algoliasearch-crawler-github-actions@v1.1.0 +# id: algolia_crawler +# with: +# crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} +# crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} +# algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} +# algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} +# site-url: 'https://noir-lang.org/' +# crawler-name: noir-lang +# override-config: false diff --git a/tooling/nargo_fmt/src/config.rs b/tooling/nargo_fmt/src/config.rs index dd57778da92..b81fc47cf09 100644 --- a/tooling/nargo_fmt/src/config.rs +++ b/tooling/nargo_fmt/src/config.rs @@ -47,7 +47,7 @@ config! { remove_nested_parens: bool, true, "Remove nested parens"; short_array_element_width_threshold: usize, 10, "Width threshold for an array element to be considered short"; array_width: usize, 100, "Maximum width of an array literal before falling back to vertical formatting"; - single_line_if_else_max_width: usize, 100, "Maximum line length for single line if-else expressions"; + single_line_if_else_max_width: usize, 50, "Maximum line length for single line if-else expressions"; } impl Config { diff --git a/tooling/nargo_fmt/tests/expected/if.nr b/tooling/nargo_fmt/tests/expected/if.nr index 9893239750c..30a60e50577 100644 --- a/tooling/nargo_fmt/tests/expected/if.nr +++ b/tooling/nargo_fmt/tests/expected/if.nr @@ -1,4 +1,16 @@ fn main() { + let (x,y) = if is_square(gx1) { + (x1, sqrt(gx1)) + } else { + (x2, sqrt(gx2)) + }; + + let n = if x != y { + if x != 20 { slice.push_back(y) } else { slice } + } else { + slice + }; + if false { (); (); diff --git a/tooling/nargo_fmt/tests/input/if.nr b/tooling/nargo_fmt/tests/input/if.nr index 0985928396d..ab39df006ea 100644 --- a/tooling/nargo_fmt/tests/input/if.nr +++ b/tooling/nargo_fmt/tests/input/if.nr @@ -1,4 +1,8 @@ fn main() { + let (x,y) = if is_square(gx1) {(x1, sqrt(gx1))} else {(x2, sqrt(gx2))}; + + let n = if x != y { if x != 20 { slice.push_back(y) } else { slice } } else { slice }; + if false { ();