Skip to content

Commit

Permalink
Merge branch 'master' into furnic/fmt-cmd-help
Browse files Browse the repository at this point in the history
  • Loading branch information
nfurfaro authored Oct 28, 2023
2 parents c6e6b16 + 778e620 commit 38374ce
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 22 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/recrawler.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tooling/nargo_fmt/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 12 additions & 0 deletions tooling/nargo_fmt/tests/expected/if.nr
Original file line number Diff line number Diff line change
@@ -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 {
();
();
Expand Down
4 changes: 4 additions & 0 deletions tooling/nargo_fmt/tests/input/if.nr
Original file line number Diff line number Diff line change
@@ -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
{
();
Expand Down

0 comments on commit 38374ce

Please sign in to comment.