mirror of
				https://github.com/TheLocehiliosan/yadm
				synced 2025-06-13 13:03:58 +00:00 
			
		
		
		
	Changes for new shellcheck compliance
This commit is contained in:
		
							parent
							
								
									c8acf77e04
								
							
						
					
					
						commit
						f9e0368385
					
				| @ -25,7 +25,7 @@ def pytest_addoption(parser): | ||||
| @pytest.fixture(scope='session') | ||||
| def shellcheck_version(): | ||||
|     """Version of shellcheck supported""" | ||||
|     return '0.8.0' | ||||
|     return '0.9.0' | ||||
| 
 | ||||
| 
 | ||||
| @pytest.fixture(scope='session') | ||||
|  | ||||
							
								
								
									
										14
									
								
								yadm
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								yadm
									
									
									
									
									
								
							| @ -289,18 +289,18 @@ function record_score() { | ||||
|         # increase the index of any existing alt_template_cmds | ||||
|         new_cmds=() | ||||
|         for cmd_index in "${!alt_template_cmds[@]}"; do | ||||
|             new_cmds[$((cmd_index+1))]="${alt_template_cmds[$cmd_index]}" | ||||
|             new_cmds[cmd_index+1]="${alt_template_cmds[$cmd_index]}" | ||||
|         done | ||||
|         alt_template_cmds=() | ||||
|         for cmd_index in "${!new_cmds[@]}"; do | ||||
|             alt_template_cmds[$cmd_index]="${new_cmds[$cmd_index]}" | ||||
|             alt_template_cmds[cmd_index]="${new_cmds[$cmd_index]}" | ||||
|         done | ||||
|     else | ||||
|         alt_targets+=("$tgt") | ||||
|         # set index to the last index (newly created one) | ||||
|         for index in "${!alt_targets[@]}"; do :; done | ||||
|         # and set its initial score to zero | ||||
|         alt_scores[$index]=0 | ||||
|         alt_scores[index]=0 | ||||
|      fi | ||||
|   fi | ||||
| 
 | ||||
| @ -309,8 +309,8 @@ function record_score() { | ||||
| 
 | ||||
|   # record higher scoring sources | ||||
|   if [ "$score" -gt "${alt_scores[$index]}" ]; then | ||||
|     alt_scores[$index]="$score" | ||||
|     alt_sources[$index]="$src" | ||||
|     alt_scores[index]="$score" | ||||
|     alt_sources[index]="$src" | ||||
|   fi | ||||
| 
 | ||||
| } | ||||
| @ -336,8 +336,8 @@ function record_template() { | ||||
|   fi | ||||
| 
 | ||||
|   # record the template command, last one wins | ||||
|   alt_template_cmds[$index]="$cmd" | ||||
|   alt_sources[$index]="$src" | ||||
|   alt_template_cmds[index]="$cmd" | ||||
|   alt_sources[index]="$src" | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user